A tweet-sized debugger for visualizing your CSS layouts. Outlines every DOM element on your page a random (valid) CSS hex color.
One-line version to paste in your DevTools
Use $$ if your browser aliases it:
~ 108 byte version
| #!/usr/bin/env bash | |
| function getNodes() { | |
| kubectl get --raw=/api/v1/nodes | jq -r '.items[].metadata.name' | |
| } | |
| function getPVCs() { | |
| jq -s '[flatten | .[].pods[].volume[]? | select(has("pvcRef")) | '\ | |
| '{name: .pvcRef.name, capacityBytes, usedBytes, availableBytes, '\ | |
| 'percentageUsed: (.usedBytes / .capacityBytes * 100)}] | sort_by(.name)' |
| version: '3' | |
| services: | |
| # FRONT | |
| chronograf: | |
| # Full tag list: https://hub.docker.com/r/library/chronograf/tags/ | |
| image: chronograf | |
| deploy: | |
| replicas: 1 | |
| placement: | |
| constraints: |
| # You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine | |
| # This is how I upload my new Sol Trader builds (http://soltrader.net) | |
| # Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash | |
| S3KEY="my aws key" | |
| S3SECRET="my aws secret" # pass these in | |
| function putS3 | |
| { | |
| path=$1 |
| #!/bin/bash | |
| ##################################################### | |
| # Name: Bash CheatSheet for Mac OSX | |
| # | |
| # A little overlook of the Bash basics | |
| # | |
| # Usage: | |
| # | |
| # Author: J. Le Coupanec | |
| # Date: 2014/11/04 |
| ;;all the available sizes as a map with indexes. | |
| ;; ex {:pp 0, :p 1} | |
| (def sizes | |
| (apply hash-map | |
| (flatten | |
| (map-indexed | |
| (fn [i s] (list (keyword s) i)) | |
| '(pp, p, m, mm, g, gg, a, aa))))) | |
| ;; the comparator itself. takes s (the map of available sizes as argument) |
| #!/usr/bin/env sh | |
| ## | |
| # This is script with usefull tips taken from: | |
| # https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
| # | |
| # install it: | |
| # curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
| # |
6 steps to set up a rails development environment on OS X:
/usr/bin/ruby -e "$(/usr/bin/curl -fksSL https://raw.github.com/mxcl/homebrew/master/Library/Contributions/install_homebrew.rb)"bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)rvm install 1.9.3| (ns expimp.core | |
| (:use [korma.core] | |
| [korma.db])) | |
| (defdb src (mysql | |
| {:db "xx" | |
| :user "xx" :password "xx" | |
| :host "myrds.us-east-1.rds.amazonaws.com"})) | |
| (defdb target (postgres {:db "xx" :user "xx" :password "xx"})) |
| git rm -r --cached . | |
| git add . | |
| git commit -m ".gitignore is now working" |