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
#include <iostream> | |
using namespace std; | |
int main( int argc, char *argv[] ) | |
{ | |
int number; | |
// Go forever | |
while( 1 ) |
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
while( True ): | |
number = raw_input( "Enter any number you want!: " ) | |
if number.isdigit(): | |
print int( number ) + 5 | |
else: | |
print "That's not a number, silly!" |
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/python | |
from subprocess import check_output, call | |
attempts = 0 | |
# Keep connecting to Uniwireless until you get a valid IP. | |
while True: | |
try: |
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
from Queue import Queue | |
# Convert a list of prev nodes into a forward path | |
def backtrace( prev ): | |
current = 100 | |
path = [] | |
while current > 0: | |
path.insert( 0, current ) | |
current = prev[ current ] | |
return path |
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
#!/bin/bash | |
# Make sure only root can run our script | |
if [[ $EUID -ne 0 ]]; then | |
echo "This script must be run as root" 1>&2 | |
exit 1 | |
fi | |
while true; do | |
count=$(ping -c 2 -s 1 -t 2 google.com | grep -E " 5?0\.0% packet loss") |
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
import sys | |
import csv | |
import urllib | |
if len( sys.argv ) < 4: | |
print "Error: incorrect number of arguments." | |
print "Usage: %s <key> <input file> <output file>" % sys.argv[ 0 ] | |
key = sys.argv[ 1 ] | |
input_file = sys.argv[ 2 ] |
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
<div id="mobiletheory_overpass" style="position: absolute; display: block; visibility: visible; background-image: none; background-color: transparent; margin: 0px; padding: 0px; border: 0px; left: 0px; bottom: 0px; line-height: 0; overflow: visible; z-index: 2147483644; top: 1304px; width: 320px; background-position: initial initial; background-repeat: initial initial;"> <a href="http://ads.admarvel.com/fam/ck.php?p=__pid=d16b452983996a25__sid=95588__bid=1112494__cb=17f6e0d39e__h=1424129140__acp=2cbd20c0694896a54168579a514bc7f3__s=dea93581afc0f482f9a70b90a9bbbd13__maxdest=http%3A%2F%2Fads.admarvel.com%2Ffam%2Fck.php%3Fp%3D__pid%3D824dc20d7d963470__sid%3D96359__bid%3D1199270__cb%3D82610306c4__h%3D1424129140__acp%3D4e1e92413dd7f7334dde2568792dc923__s%3Ddbcc6ba33150e4100dd2622a16fb98d3__maxdest%3Dhttp%3A%2F%2Fad.doubleclick.net%2Fjump%2FN5079.287681.OPERASOFTWAREMOBILE%2FB8552202.115555188%3Bsz%3D320x50%3Bord%3D1424129140.0397%3F"> | |
<img src="http://ad.doubleclick.net/ad/N5079.287681.OPERASOFTWAREMOBILE/B8552202. |
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
<div id="div-gpt-ad-1413991104862-0" style="width:300px; height:250px;"> | |
<script type="text/javascript"> | |
googletag.cmd.push(function() { googletag.display('div-gpt-ad-1413991104862-0'); }); | |
</script> | |
<div id="google_ads_iframe_/22633255/IJReview_YHMG_VideoUnit_300x250_0__container__" style="border: 0pt none;"><iframe id="google_ads_iframe_/22633255/IJReview_YHMG_VideoUnit_300x250_0" name="google_ads_iframe_/22633255/IJReview_YHMG_VideoUnit_300x250_0" width="300" height="250" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" src="javascript:"<html><body style='background:transparent'></body></html>"" style="border: 0px; vertical-align: bottom;"></iframe></div><iframe id="google_ads_iframe_/22633255/IJReview_YHMG_VideoUnit_300x250_0__hidden__" name="google_ads_iframe_/22633255/IJReview_YHMG_VideoUnit_300x250_0__hidden__" width="0" height="0" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" src="javascript:"<html><body style='background:transparent'></body></html>" |
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
<div id="div-gpt-ad-1393444597560-0" style="width:300px; height:250px;"> | |
<script type="text/javascript"> | |
googletag.cmd.push(function() { googletag.display('div-gpt-ad-1393444597560-0'); }); | |
</script> | |
<div id="google_ads_iframe_/22633255/IJR_Articles_BTF_300x250_0__container__" style="border: 0pt none;"><iframe id="google_ads_iframe_/22633255/IJR_Articles_BTF_300x250_0" name="google_ads_iframe_/22633255/IJR_Articles_BTF_300x250_0" width="300" height="250" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" src="javascript:"<html><body style='background:transparent'></body></html>"" style="border: 0px; vertical-align: bottom;"></iframe></div><iframe id="google_ads_iframe_/22633255/IJR_Articles_BTF_300x250_0__hidden__" name="google_ads_iframe_/22633255/IJR_Articles_BTF_300x250_0__hidden__" width="0" height="0" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" src="javascript:"<html><body style='background:transparent'></body></html>"" style="border: 0px; vertical-ali |
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
// Social Sharing URL | |
function social_sharing_url() { | |
var base_url = document.URL.replace( /\?.*?$/, '' ); | |
query_params = [] | |
if( window.title_variation ) { | |
query_params.push( [ 'title_var', window.title_variation ] ); | |
} | |
if( window.optimizely_query_key ) { | |
query_params.push( [ window.optimizely_query_key, window.optimizely_query_value ] ); | |
} |
OlderNewer