View Dockerfile
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
FROM ubuntu:latest | |
RUN apt-get update && \ | |
apt-get install -y xvfb firefox python-pip xdotool x11vnc | |
RUN apt-get install -y wget | |
RUN wget https://github.com/mozilla/geckodriver/releases/download/v0.16.1/geckodriver-v0.16.1-linux64.tar.gz | |
RUN tar zxvf geckodriver-v0.16.1-linux64.tar.gz && mv geckodriver /usr/bin/geckodriver | |
ENV DISPLAY=:1.0 |
View feverFlat.opml
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
<?xml version="1.0" encoding="UTF-8"?> | |
<opml version="1.0"> | |
<!-- OPML generated by Fever --> | |
<head><title>Fever</title></head> | |
<body> | |
<outline type="rss" text="decoding.io/feed" title="decoding.io/feed" xmlUrl="decoding.io/feed/" htmlUrl=""/> | |
<outline type="rss" text="aworkinglibrary.com/library/rss" title="aworkinglibrary.com/library/rss" xmlUrl="http://aworkinglibrary.com/library/rss/" htmlUrl=""/> | |
<outline type="rss" text="blog.hugsformonsters.com/rss" title="blog.hugsformonsters.com/rss" xmlUrl="http://blog.hugsformonsters.com/rss" htmlUrl=""/> | |
<outline type="rss" text="daverupert.com/feed" title="daverupert.com/feed" xmlUrl="http://daverupert.com/feed/" htmlUrl=""/> | |
<outline type="rss" text="elliotjaystocks.com/blog/feed" title="elliotjaystocks.com/blog/feed" xmlUrl="http://elliotjaystocks.com/blog/feed/" htmlUrl=""/> |
View weather.rb
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 'date' | |
require 'httparty' | |
require 'json' | |
MY_COMPASS="https://compass" | |
COMPASS_LOCATION_READ_TOKEN="" | |
COMPASS_WEATHER_WRITE_TOKEN="" | |
DARK_SKY_API="" | |
data = JSON.parse(HTTParty.get(MY_COMPASS+'/api/last?token='+COMPASS_LOCATION_READ_TOKEN).body) |
View game.js
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
"use strict"; | |
var superhex = function() { | |
function e(e) { | |
return 0 == e ? tn[0] : e == Xt ? tn[(Xt - 1) % (tn.length - 1) + 1] : Xt > 0 && e > Xt ? $e[(e - 2) % $e.length] : $e[(e - 1) % $e.length] | |
} | |
function t(e) { | |
return 0 == e ? nn[0] : e == Xt ? nn[(Xt - 1) % (nn.length - 1) + 1] : e > Xt ? et[(e - 2) % et.length] : et[(e - 1) % et.length] | |
} |
View json.php
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 | |
$configs = include('configs.php'); | |
$results = file_get_contents('text.txt'); | |
$feed_items = array(); | |
$wp_comments = eval("return " . $results . ";"); | |
$i=0; | |
foreach ($wp_comments as $livepost){ | |
if($i==20) break; |
View Asian Music chart HackAPI
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
Steps to get Asian Music chart | |
1. Open http://www.bbc.co.uk/asiannetwork/chart/print | |
2. Fire up jQuerify using https://chrome.google.com/webstore/detail/jquerify/gbmifchmngifmadobkcpijhhldeeelkc | |
3. Run the below script in the console to get the tbl variable | |
var tbl = $('table tr:has(td)').map(function(i, v) { | |
var $td = $('td', this); | |
return { | |
id: ++i, |
View gist:2ae690e1b46bf3f04d8a9a21750657a5
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
(work-python 2.7)$ pip freeze | |
Flask==0.9 | |
Jinja2==2.6 | |
PIL==1.1.7 | |
Werkzeug==0.8.3 | |
distribute==0.6.26 | |
gevent==1.0b3 | |
gevent-zeromq==0.2.5 | |
greenlet==0.4.0 | |
ipython==0.12.1 |
View app.py
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
from flask import Flask, request, url_for | |
from scipy.optimize import bisect | |
import math | |
import numpy as np | |
app = Flask(__name__) | |
app.secret_key = 'Whatever' | |
@app.route('/') | |
def index(): |
View mplonflask.py
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 matplotlib | |
matplotlib.use('Agg') | |
from matplotlib import pyplot | |
import numpy | |
from flask import Flask, send_file | |
from cStringIO import StringIO | |
app = Flask(__name__) |
View private.xml
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
<?xml version="1.0"?> | |
<!-- Documentation: https://pqrs.org/osx/karabiner/xml.html.en --> | |
<root> | |
<appdef> | |
<appname>Messages</appname> | |
<equal>com.apple.iChat</equal> | |
</appdef> | |
<item> | |
<name>Enable Shift+enter newline shortcut in Messages app</name> | |
<identifier>private.Messages.NewLine</identifier> |
NewerOlder