This file contains hidden or 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
| import java.io.BufferedInputStream; | |
| import java.net.URL; | |
| import java.net.URLConnection; | |
| import org.json.JSONArray; | |
| import org.json.JSONObject; | |
| protected void foo () { | |
| // The input stream from the JSON response | |
| BufferedInputStream buffer = null; |
This file contains hidden or 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
| curl "http://www.gratisography.com/pictures/[1-88]H.jpg" -o "#1.jpg" |
This file contains hidden or 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
| Each YouTube video has 4 generated images. They are predictably formatted as follows: | |
| http://img.youtube.com/vi/<insert-youtube-video-id-here>/0.jpg | |
| http://img.youtube.com/vi/<insert-youtube-video-id-here>/1.jpg | |
| http://img.youtube.com/vi/<insert-youtube-video-id-here>/2.jpg | |
| http://img.youtube.com/vi/<insert-youtube-video-id-here>/3.jpg | |
| The first one in the list is a full size image and others are thumbnail images. The default thumbnail image (ie. one of 1.jpg, 2.jpg, 3.jpg) is: | |
| http://img.youtube.com/vi/<insert-youtube-video-id-here>/default.jpg |
This file contains hidden or 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 setWeatherIcon(condid) { | |
| switch(condid) { | |
| case '0': var icon = '<i class="wi-tornado"></i>'; | |
| break; | |
| case '1': var icon = '<i class="wi-storm-showers"></i>'; | |
| break; | |
| case '2': var icon = '<i class="wi-tornado"></i>'; | |
| break; | |
| case '3': var icon = '<i class="wi-thunderstorm"></i>'; |
This file contains hidden or 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
| #!/bin/bash | |
| # checkdns | |
| # A very simple dig tool for checking DNS propagation with Google Public DNS and OpenDNS after migrating servers | |
| # | |
| # INSTRUCTIONS | |
| # Put this in your ~/bin folder, make it executable and run it by typing "checkdns" in your command line | |
| read -p "Enter domain: " domain | |
| # Google Public DNS |
NewerOlder