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 python | |
''' Downloads all enclosed mp3s from http://yearofmixtapes.blogspot.com ''' | |
import subprocess | |
import feedparser # http://feedparser.org | |
d = feedparser.parse("http://feeds.feedburner.com/myyearofmixtapes") | |
enclosures = [x.enclosures[0] for x in d.entries if x.enclosures] | |
mp3_urls = [m['href'] for m in enclosures if m['type'] == 'audio/mpeg'] |
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 simplejson | |
import urllib2 | |
r = urllib2.urlopen('http://friendfeed.com/api/feed/room/science21') | |
json = simplejson.loads(r.read()) | |
# I just want to look at the entries in the room | |
e = json['entries'] |
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(){ | |
$('#jqt').ajaxComplete(function(){ | |
add_ga(); // add google analytics on each page load | |
}); | |
$(document).ready(function() { | |
add_ga(); // add google analytics to the first page | |
}); | |
function add_ga() { |
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
$('#link').click(function( | |
$('#content_container').fadeOut("fast",function() { | |
updatePage(); | |
//other code here | |
}).fadeIn(); | |
); |
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
find -X . -name "*201009*" -o -name "*201010*" -o -name "*201011*" | xargs tar czvf ~/Desktop/corplogs.tgz |
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
<DOCTYPE html> | |
<head> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> | |
<title>csstest</title> | |
<style type="text/css" media="screen"> | |
img:hover {border:#CCC 2px solid; | |
opacity:1.0; | |
-webkit-transition:opacity 1s ease-in; |
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 class="close icon-remove" data-dismiss="modal"></div> |
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
# Get a list of Azure VM Skus for a particular region | |
from azure.common.client_factory import get_client_from_cli_profile | |
from azure.mgmt.compute import ComputeManagementClient | |
client = get_client_from_cli_profile(ComputeManagementClient) | |
SUBID = 'YOUR-SUBSCRIPTION-ID' | |
LOCATION = 'eastus2' |
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
{ | |
"handler": "Microsoft.Compute.VmExtension", | |
"version": "0.1.2-preview", | |
"parameters": { | |
"elements": [ | |
{ | |
"name": "tenant", | |
"type": "Microsoft.Common.TextBox", | |
"label": "Environment ID", | |
"toolTip": "Your Dynatrace environment 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
server { | |
listen 80; | |
location / { | |
proxy_pass http://localhost:3000; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection keep-alive; | |
proxy_set_header Host $host; | |
proxy_cache_bypass $http_upgrade; | |
} |
OlderNewer