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
<iframe width="640" height="360" src="//www.youtube.com/embed/XyLQjMC2Q38?feature=player_detailpage" frameborder="0" allowfullscreen></iframe> |
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
javascript:(function() | |
{ | |
var url = window.location; | |
if(url.origin.indexOf("www.youtube.com") == -1) | |
{ | |
alert("Sorry, this is not a YouTube page! URL: " + url.href); | |
} | |
else | |
{ | |
var width = "width=" + 600; |
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 to the gh-pages branch | |
git checkout gh-pages | |
# bring gh-pages up to date with master | |
git rebase master | |
# commit the changes | |
git push origin gh-pages | |
# return to the master branch | |
git checkout master | |
# Source: http://lea.verou.me/2011/10/easily-keep-gh-pages-in-sync-with-master/ |
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
javascript:void(window.open('http://pushbullet.com/push/link?title='+encodeURIComponent(document.title)+'&url='+encodeURIComponent(location.href))) | |
// Source: http://pastebin.com/183UqMc1 |
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
// Make sure to rename the object fields | |
// Table's header gets ignored | |
var tbl = $('table#tableToConvert tr:has(td)').map(function(i, v) { | |
var $td = $('td', this) | |
return { | |
wkid: $td.eq(0).text(), | |
name: $td.eq(1).text() | |
} | |
}).get(); |
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
// This script uses Node.js | |
// the 'arrayFile.json' is in the same folder as where you're running this command. | |
// This is not a script, but just the commands. Run from the shell. | |
// Sample item from the JSON file: | |
// { "id": "1" , "name": "one" } | |
// Files are saved under the folder 'itemsFolder', each item is saved in a JSON file name '<id>.json'. | |
var itemsArray = require('./arrayFile.json'); | |
itemsArray.forEach( function (item) { item.writeFileSync('itemsFolder/' + item.id + '.json', JSON.stringify(item) ); } ); |