Skip to content

Instantly share code, notes, and snippets.

@jashsu
jashsu / spyglass-release.py
Last active August 29, 2015 13:56
Spyglass is an email notification script for the Glass Shop.
#!/usr/bin/env python
""" Spyglass is an email notification script for the Glass Shop.
Setup:
------
Install Python 2.7.x and these additional libraries: requests, lxml.
Enter your own smtp server, smtp login details and notification email
recipient into the relevant fields in Spyglass.__init__. In order for
Spyglass to fetch the page, you will also need to copy the cookie
strings from an authenticated browser session (get this by logging
/*
* robotMaze.js
*
* The blue key is inside a labyrinth, and extracting
* it will not be easy.
*
* It's a good thing that you're a AI expert, or
* we would have to leave empty-handed.
*/
'' =================================================================================================
''
'' File....... dc22_badge_human.spin
''
'' Authors.... Jon "JonnyMac" McPhalen and Ryan "1o57" Clarke
'' MIT License
'' -- see below for terms of use
''
'' E-mail..... jon@jonmcphalen.com
'' 1o57@10000100001.org
@jashsu
jashsu / gist:45eced901cfc3811e0c2
Created August 12, 2014 23:21
defcon 22 morse
' -.. . ..-. -.-. --- -. ..--- ..---
Sheepy3 byte (@Sheepy3_X - @Sheepy3) / 2 + 1
byte %00000001, 200
byte %00000011, 200
byte %00000111, 200
byte %00001110, 200
byte %00011101, 200
byte %00111010, 200
byte %01110101, 200
byte %11101010, 200
Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)] on win32
Type "copyright", "credits" or "license()" for more information.
==== No Subprocess ====
>>> def factorial(n):
if n < 1:
sys.exit
elif n == 1:
return 1
else:
return n * factorial(n-1)
def test_all_apps_link(self):
p = self.init()
self.assert_elem(self.find_elem('xpath', '/div/div/a[1]', p),
{'inner' : 'All Applications',
'attrib': {'href': '/viewProjects.do',
'class': 'title colorMediumBlue hover'},
'invoke': {'is_displayed': True}})
var goog = goog || {};
goog.global = this;
goog.DEBUG = !0;
goog.LOCALE = "en";
goog.TRUSTED_SITE = !0;
goog.provide = function (a) {
goog.exportPath_(a)
};
goog.setTestOnly = function (a) {
if (!goog.DEBUG) throw a = a || "", Error("Importing test-only code into non-debug environment" + a ? ": " + a : ".");
{
"canonicalUrl": "http://en.m.wikipedia.org/w/index.php?curid=25658949",
"notification": {
"level": "DEFAULT"
},
"menuItems": [
{
"action": "READ_ALOUD"
},
{
def is_power_of_three(num):
from types import IntType, FloatType
assert type(num) in (IntType, FloatType)
x = 3
if num in (0, 1): return True
elif num < 0: return False
elif num > 0 and num < 1:
while True:
y = 1.0/x #hacky..
#print y, x
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
// Source File Name: HiddenViewConfiguration.java
package com.google.glass.hidden;
import android.view.ViewConfiguration;
// Referenced classes of package com.google.glass.hidden: