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 rollDice(){ | |
var output = []; | |
var die1 = Math.floor(Math.random() * 6); | |
var die2 = Math.floor(Math.random() * 6); | |
// need to add 1 to avoid zero based output | |
output.push(die1 + 1); | |
output.push(die2 + 1); | |
return output; | |
} |
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
<?php | |
/* --------------------------------- | |
26 January, 2008 - 2:55pm: | |
<!-- http://websitetips.com/articles/optimization/html/crunch/ --> | |
Adapted for WebsiteTips.com by Shirley Kaiser, SKDesigns skdesigns.com. | |
The example below is adapted from a post by londrum 8:29 pm on June 7, 2007: | |
<!-- http://www.webmasterworld.com/php/3361456.htm --> | |
"crunch up your HTML into a single line | |
a handy little script..." |
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
# Some useful Unicode entities | |
# Non-Breaking Space | |
snippet nbs | |
| |
# ← | |
snippet left | |
← | |
# → | |
snippet right | |
→ |
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
# problem description here | |
# | |
File.open(ARGV[0]).each_line do |line| | |
# solution here | |
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
<a href='tel:123456789' title='Free Call 123456789' class='tel'>Free Call 123 456 789</a><!-- works on most mobiles --> | |
<a href='tel://123456789' title='Free Call 123456789' class='tel'>Free Call 123 456 789</a><!-- workaround for chrome mobile --> |
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
<a href='tel:123456789' title='Free Call 123456789' class='tel'>Free Call 123 456 789</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
-- Round 1 -- | |
Pull ups with parallel hands - 8 reps followed by 10 reps on stool | |
Triceps dips - 20 reps | |
Plank with alternating knee forwards - 30 reps | |
-- Round 2 -- | |
Chin ups with palms facing - 5 reps followed by 10 reps on stool | |
Triceps dips - 20 reps | |
Plank with alternating knee forwards - 30 reps |
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
# --delete anything not on source | |
# --progress show progress | |
# -h human readable | |
rsync -hva --delete --progress /Users/arup/Documents/ /Volumes/SL\ Backup/Users/arup/Documents/ |
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 recall(thisfield, defaulttext) { | |
if (thisfield.value == "") { | |
thisfield.value = defaulttext; | |
} | |
} | |
// the following goes in the text input line | |
// onfocus="this.value= '';" onblur="recall(this,'Your email address');" | |
// change 'Your email address' to any default text |
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
#!/usr/bin/env bash | |
# push to the yoga-clothes-company folder | |
rsync -e "ssh -p 2222" -havC --delete-excluded --exclude '.git/' --exclude yoga-clothes-company.sh --progress ~/GitRepos/yoga-clothes-company/ [email protected]:/home/arupsen/public_html/yoga-clothes-company/ |
NewerOlder