This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # bash generate random alphanumeric string | |
| # | |
| # bash generate random 32 character alphanumeric string (upper and lowercase) and | |
| NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
| # bash generate random 32 character alphanumeric string (lowercase only) | |
| cat /dev/urandom | tr -dc 'a-z0-9' | fold -w 32 | head -n 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| git reset --hard | |
| git clean -f -d | |
| Description: | |
| ============ | |
| Git Tips: Remove untracked files and directories from the working | |
| tree when switching branches or checking out different commits. | |
| Explanation: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'rubygems' | |
| require 'yaml' | |
| # A demonstration of YAML anchors, references and handling of nested values | |
| # For more info, see: | |
| # http://atechie.net/2009/07/merging-hashes-in-yaml-conf-files/ | |
| stooges = YAML::load( File.read('stooges.yml') ) | |
| # => { | |
| # "default" => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // by alex evans, 2011. released into the public domain. | |
| // based on a first ever reading of the png spec, it occurs to me that a minimal png encoder should be quite simple. | |
| // this is a first stab - may be buggy! the only external dependency is zlib and some basic typedefs (u32, u8) | |
| // | |
| // VERSION 0.02! now using zlib's crc rather than my own, and avoiding a memcpy and memory scribbler in the old one | |
| // by passing the zero byte at the start of the scanline to zlib first, then the original scanline in place. WIN! | |
| // | |
| // more context at http://altdevblogaday.org/2011/04/06/a-smaller-jpg-encoder/. | |
| // | |
| // follow me on twitter @mmalex http://twitter.com/mmalex |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* ---------------------------------------------------------------------------------------------------- | |
| Super Form Reset | |
| A couple of things to watch out for: | |
| - IE8: If a text input doesn't have padding on all sides or none the text won't be centered. | |
| - The default border sizes on text inputs in all UAs seem to be slightly different. You're better off using custom borders. | |
| - You NEED to set the font-size and family on all form elements | |
| - Search inputs need to have their appearance reset and the box-sizing set to content-box to match other UAs |
NewerOlder