Summary | How to control (or Understand) your GIST page's files list order. |
Notice | not official documentation. |
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
jupyter: | |
image: jupyter/datascience-notebook | |
environment: | |
- PASSWORD=${PASSWORD} | |
nginx: | |
image: nginx | |
links: | |
- jupyter |
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
vm_infos = `vboxmanage list vms` | |
puts 'Port Forwardings:' | |
puts '---------------------------------' | |
vm_infos.each_line do |vm_info| | |
vm_name = vm_info.scan(/\"(.*)\"/) | |
vm_id = vm_info.scan(/.*{(.*)}/).join('') | |
vm_detail_info = `vboxmanage showvminfo #{vm_id}` |
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
# Convert XML Youtube subtitles to SubRip (srt) format | |
# To download the subtitle in XML, put de code of the Youtube video | |
# at the end of the next url: | |
# http://video.google.com/timedtext?hl=en&lang=en&v= | |
require 'rubygems' | |
require 'hpricot' | |
youtube_xml = ARGV[0] | |
xml = Hpricot.XML(open(youtube_xml)) |
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
# Adapted from http://superuser.com/a/568016/64151 | |
# Add this function to .bash_profile, then use | |
# "setjdk 1.7", "setjdk 1.8", or "setjdk" (to see current setting). | |
function setjdk() { | |
if [ $# -ne 0 ]; then | |
function removeFromPath() { | |
export PATH=$(echo $PATH | sed -E -e "s;:$1;;" -e "s;$1:?;;") | |
} | |
removeFromPath '/System/Library/Frameworks/JavaVM.framework/Home/bin' |
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
# Add field | |
echo '{"hello": "world"}' | jq --arg foo bar '. + {foo: $foo}' | |
# { | |
# "hello": "world", | |
# "foo": "bar" | |
# } | |
# Override field value | |
echo '{"hello": "world"}' | jq --arg foo bar '. + {hello: $foo}' | |
{ |
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
// http://aboutcode.net/2010/11/11/list-github-projects-using-javascript.html | |
jQuery.githubUserRepositories = function(username, callback) { | |
jQuery.getJSON("https://api.github.com/users/" + username + "/repos?callback=?", callback); | |
} | |
jQuery.fn.loadRepositores = function(username) { | |
this.html("<span>Querying GitHub for repositories...</span>"); | |
var target = this; |
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
# Convert XML Youtube subtitles to SubRip (srt) format | |
# To download the subtitle in XML, put de code of the Youtube video | |
# at the end of the next url: | |
# http://video.google.com/timedtext?hl=en&lang=en&v= | |
require 'rubygems' | |
require 'hpricot' | |
youtube_xml = ARGV[0] | |
xml = Hpricot.XML(open(youtube_xml)) |
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
Gist title: "List GitHub Projects Using jQuery" | |
Summary: An example JavaScript program using jQuery to get a list of GitHub projects. | |
Original source: http://aboutcode.net/2010/11/11/list-github-projects-using-javascript.html |