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
accountAddUserForm :: AccountId -> Form (Text, AccountId) | |
accountAddUserForm accountId = renderDivs $ (,) | |
<$> areq textField "User email address" Nothing | |
<*> pure accountId |
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
require 'yaml' | |
require 'httparty' | |
settings = YAML::load_file(File.dirname(File.expand_path(__FILE__)) + '/namecheap.yml') | |
username = settings['namecheap']['user'] | |
api_key = settings['namecheap']['api_key'] | |
request_string = "https://api.namecheap.com/xml.response" |
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 httplib | |
import urllib | |
import json | |
pairs= { | |
'btc_usd' : "1", | |
'ltc_btc' : "10", | |
'ltc_usd' : "14" | |
} |
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
d = str(raw_input("Enter date")) | |
n = str(raw_input("Enter name")) | |
print n,d |
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
def get_name(): | |
name = str(raw_input("Enter your name: ")) | |
return name | |
def get_birthday(): | |
birthday = str(raw_input("Enter your birthdate: ")) | |
return birthday | |
def output_name_and_birthday(name,birthday): | |
print "Your name is: ", name, " and your birthday is:", birthday |
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
<?php | |
$zipfile = $_GET['zip']; | |
header('Content-Type: application/zip'); | |
echo file_get_contents($zipfile); | |
?> |
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
def shift_case(word) | |
lookup = { | |
'z' => 'Z', | |
'Z' => 'z', | |
'x' => 'X', | |
'X' => 'x', | |
'c' => 'C', | |
'C' => 'c', | |
'v' => 'V', | |
'V' => 'v', |
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
var allusers = []; $('.author').map(function(key,item){if(allusers.indexOf(item.innerHTML) == -1) allusers.push(item.innerHTML);}); console.log(allusers.length + " users seen"); lucky_number = Math.floor(Math.random()*(allusers.length+1)); console.log("lucky number is " + lucky_number); lucky_user=allusers[lucky_number]; msg = "lucky user is " + lucky_user; console.log(msg); "http://www.reddit.com/u/" + lucky_user |
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
var tableToExcel = (function() { | |
var uri = 'data:application/vnd.ms-excel;base64,' | |
, template = '<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--></head><body><table>{table}</table></body></html>' | |
, base64 = function(s) { return window.btoa(unescape(encodeURIComponent(s))) } | |
, format = function(s, c) { return s.replace(/{(\w+)}/g, function(m, p) { return c[p]; }) } | |
return function(table, name) { | |
if (!table.nodeType) table = document.getElementById(table) | |
var ctx = {worksheet: name || 'Worksheet', table: table.innerHTML} | |
window.location.href = uri + base64(format(template, ctx)) | |
} |
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
window.setInterval(function(){$(document.getElementById('stars').childElements()[4]).click()},300) |
OlderNewer