Skip to content

Instantly share code, notes, and snippets.

{
"currently": {
"apparentTemperature": 68.95,
"cloudCover": 0.18,
"dewPoint": 54.93,
"humidity": 0.61,
"icon": "clear-day",
"nearestStormBearing": 156,
"nearestStormDistance": 124,
"ozone": 338.39,
$("#thebutton").on("click", function(t) {
t.preventDefault(), t.stopPropagation();
if (e.hasClass("pressed"))
return;
r.thebutton._countdownInterval = window.clearInterval(r.thebutton._countdownInterval), r.thebutton._setTimer(6e4);
var n = {seconds: $("#thebutton-timer").val(),prev_seconds: r.thebutton._msgSecondsLeft,tick_time: r.thebutton._tickTime,tick_mac: r.thebutton._tickMac};
$.request("press_button", n, function(e) {
console.log(e)
}), e.addClass("pressed").removeClass("unlocked"), r.thebutton.pulse()
})
@jaxbot
jaxbot / gist:54eaeac526c4e161e4c7
Last active August 29, 2015 14:18
PyCon WiFi auto-j'accepte

Here's how to automatically log in to the WiFi at PyCon. Dumping out a few different methods here, check back for updates!

Chrome

  1. Install Tampermonkey
  2. Add this script:
// ==UserScript==
// @name         Pycon auto j'accept
// @namespace http://your.homepage/
if (!window.Bastide) window.Bastide = {};
window.Bastide.Registration = {
signup: function() {
var nameInput = document.querySelector('#signUpModal .name'),
emailInput = document.querySelector('#signUpModal .email'),
schoolInput = document.querySelector('#signUpModal .school');
var params = {
name: nameInput.value,
email: emailInput.value,
@jaxbot
jaxbot / form.html
Last active October 4, 2015 17:59 — forked from divneet/index.js
<!doctype html>
<html>
<head>
<script src='https://www.google.com/recaptcha/api.js'></script>
<script>
function registerAPI(form) {
var params = {
username: form.username.value,
password: form.password.value,
email: form.email.value,
private String getHTTPString(String url, CookieStore jar) {
try {
DefaultHttpClient httpclient = new DefaultHttpClient();
HttpGet httpget = new HttpGet(url);
httpget.setHeader("User-Agent", UA);
httpclient.setCookieStore(jar);
HttpResponse response = httpclient.execute(httpget);
InputStream inputStream = response.getEntity().getContent();

Python, pip, virtualenv on Windows

  1. Download Python -- please use this version!

THIS IS IMPORTANT Choose "Python 3.4.4 - Download Windows x86-64 MSI installer", specifically that one.

  1. Install it with default options
  2. After installing, open Control Panel -> System -> Advanced System Settings
  3. Click Environment Variables
  4. In the list on the bottom, choose Path and click Edit
Mon 09:54 am,,10000
Mon 09:54 am,Garage Libra,86.891757696127
Mon 10:00 am,Garage Libra,86.891757696127
Mon 10:15 am,Garage Libra,88.480635551142
Mon 10:30 am,Garage Libra,93.64448857994
Mon 10:45 am,Garage Libra,97.616683217478
Mon 11:00 am,Garage Libra,95.729890764647
Mon 11:15 am,Garage Libra,96.524329692155
Mon 11:30 am,Garage Libra,94.93545183714
Mon 11:45 am,Garage Libra,91.658391261172
from slackbot.bot import Bot
from slackbot.bot import respond_to
from slackbot.bot import listen_to
import random
import re
import sys
def main():
bot = Bot()
bot.run()