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
{ | |
"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 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
# 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 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
#!/usr/bin/env python | |
import sys | |
def netpromoterscore(scores): | |
""" | |
Calculates the netpromoter score of a list | |
The Net Promoter Score is obtained by asking customers a single question on a 0 to 10 rating scale: | |
'How likely is it that you would recommend our company to a friend or colleague?' | |
Based on their responses, customers are categorized into one of three groups: | |
Promoters (9-10 rating), Passives (7-8 rating), and Detractors (0-6 rating). |
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
<div class="close icon-remove" data-dismiss="modal"></div> |
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
<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 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
find -X . -name "*201009*" -o -name "*201010*" -o -name "*201011*" | xargs tar czvf ~/Desktop/corplogs.tgz |
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
$('#link').click(function( | |
$('#content_container').fadeOut("fast",function() { | |
updatePage(); | |
//other code here | |
}).fadeIn(); | |
); |
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(){ | |
$('#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 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 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 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
#!/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'] |
NewerOlder