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
2.1.1 | |
[EX. 1] | |
var double = function(a) { | |
return a * 2; | |
} | |
> double(21) | |
42 | |
> typeof double |
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
// Remove an element from an object | |
var kik = {"a": "lalala", "b": {"dom_thing": window}, "c": 42}; | |
> undefined | |
kik | |
> Object | |
a: "lalala" | |
b: Object | |
c: 42 | |
__proto__: Object | |
delete kik['a'] |
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
i = 1 | |
h.each_pair do |id, type| | |
puts "#{id} - #{i}/#{h.size}" | |
begin | |
eval "`python '/System/Library/Automator/Combine PDF Pages.action/Contents/Resources/join.py' -o #{id}/joined.pdf #{id}/#{id}.pdf #{id}/attachment.pdf`" | |
rescue | |
puts "oh :(" | |
end | |
i = i+1 | |
end |
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
i = 1 | |
h.each_pair do |id, type| | |
puts "#{id} - #{i}/#{h.size}" | |
begin | |
eval "`python '/System/Library/Automator/Watermark PDF Documents.action/Contents/Resources/tool.py' --input #{id}/joined.pdf --output all/#{id}.pdf --scale=0.7 --yOffset=739 --xOffset=450 #{id}/thumb.png`" | |
rescue | |
puts "oh :(" | |
end | |
i = i+1 | |
end |
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
# recipes | |
h = {904=>"Vegetable", | |
1105=>"Grains", | |
770=>"Grains", | |
971=>"Vegetable", | |
837=>"Legumes" | |
# , ... | |
} | |
# create watermak |
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] | |
name = Stefano B. | |
email = [email protected] | |
[color] | |
ui = auto | |
[color "branch"] | |
current = yellow reverse | |
local = yellow | |
remote = green | |
[color "diff"] |
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
<script type="text/javascript"> | |
var insertAtCursor = function (myField, myValue) { | |
//IE support | |
if (document.selection) { | |
myField.focus(); | |
sel = document.selection.createRange(); |
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
remove_rootfs_verification() { | |
echo "$*" | sed ' | |
s| root=/dev/dm-0 | root=/dev/sd%D%P | | |
s| dm_verify[^=]*=[-0-9]*||g | |
s| dm=*"[^"]*"|| | |
s| ro | rw |' | |
} |
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
/* .ir from html5boilerplate */ | |
.ir { display: block; text-indent: -999em; overflow: hidden; background-repeat: no-repeat; text-align: left; direction: ltr; } | |
/* fix for .ir on inputs (ie) */ | |
.ie7 input.ir { | |
padding-top: 999em !important; | |
display: inline-block; | |
} |
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
[url "https://github.com/"] | |
insteadOf = "gh:" |
OlderNewer