This file contains 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
base64 original_img.png | base64 --decode > ~/dest/decoded_image.png |
This file contains 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
/** | |
* CLEARFIX | |
* | |
* For modern browsers | |
* 1. The space content is one way to avoid an Opera bug when the | |
* contenteditable attribute is included anywhere else in the document. | |
* Otherwise it causes space to appear at the top and bottom of elements | |
* that are clearfixed. | |
* 2. The use of `table` rather than `block` is only necessary if using | |
* `:before` to contain the top-margins of child elements. |
This file contains 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
function replaceEveryCharOf( selector, withChar, ignoreSpace ) { | |
$(selector).contents().filter(function() { | |
return this.nodeType == 3; | |
}).each(function(){ | |
var regex = ignoreSpace ? /[^\s.]/g : /./g; | |
this.textContent = this.textContent.replace(regex, withChar); | |
}); | |
} | |
// Usage: |
This file contains 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
echo "Do you think I am mad?" | |
read reply | |
echo $reply |
This file contains 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
/* | |
* Returns the different properties (Boolean) useful while responsive | |
* design. | |
*/ | |
function screenMatches() { | |
var s = {}; | |
if (window.matchMedia) { | |
/* Large desktop */ | |
s.largeDesk = window.matchMedia("(min-width: 1200px)").matches; | |
/* Usual desktop */ |
This file contains 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
;; User behaviors | |
;; ----------------------------- | |
;; Behaviors are stored as a set of diffs that are merged together | |
;; to create the final set of functionality that makes up Light Table. You can | |
;; modify these diffs to either add or subtract functionality. | |
;; | |
;; Behaviors are added to tags, objects with those tags then automatically gain | |
;; whatever logic the behavior imparts. To see a list of user-level behaviors, | |
;; start typing a word related to the functionality you want in between the square | |
;; brackets (e.g. "theme"). |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<!-- @author Vishal Telangre --> | |
<!-- @copyright 2014 --> | |
<!-- @license MIT --> | |
<plist version="1.1"> | |
<dict> | |
<key>name</key> | |
<string>Uthavdar</string> | |
<key>semanticClass</key> |
This file contains 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
GO ?= go | |
GOPATH := $(CURDIR)/_vendor:$(GOPATH) | |
all: build | |
build: | |
$(GO) build | |
# reference: http://peter.bourgon.org/go-in-production/ |
This file contains 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 'thread' | |
def process(job) | |
puts "processing job #{job}\n" | |
sleep rand(3) | |
end | |
threads = [] | |
for job in 1..10 |
OlderNewer