Skip to content

Instantly share code, notes, and snippets.

View bmuller's full-sized avatar
🐒
Whoa github has statuses

Brian Muller bmuller

🐒
Whoa github has statuses
View GitHub Profile
<div class="Picture opbandit Left" style="height:auto;width:225px;" data-opbandit-conversion='anyclick'>
<span onclick="dcsAfm('afm_1_7','2014-09-23T10:19:35.000000','6 Zitate zur Landtagswahl');window.location.href='http://snowball.gentics.com/APA/snowballtest4/Zitate-Landtagswahl.html';return false;" class="link">
<img src="http://cdn3.vol.at/2014/09/zitat-scheff-wallner-aufmacher-4094152-2-8b6dc9aee5323a4b990357d011b5ec8f.jpg" width="225" height="157" alt="6 Zitate zur Landtagswahl" />
</span>
</div>
<!-- change to -->
<div class="Picture Left" style="height:auto;width:225px;">
<span onclick="dcsAfm('afm_1_7','2014-09-23T10:19:35.000000','6 Zitate zur Landtagswahl');window.location.href='http://snowball.gentics.com/APA/snowballtest4/Zitate-Landtagswahl.html';return false;" class="link opbandit" data-opbandit-conversion='anyclick'>
@bmuller
bmuller / gist:8fed8745ff25fa3c0b98
Created September 23, 2014 09:35
vol.at change
<div class="Picture opbandit Left" style="height:auto;width:225px;" data-opbandit-conversion='anyclick'><span onclick="dcsAfm('afm_1_7','2014-09-23T10:19:35.000000','6 Zitate zur Landtagswahl');window.location.href='http://snowball.gentics.com/APA/snowballtest4/Zitate-Landtagswahl.html';return false;" class="link"><img src="http://cdn3.vol.at/2014/09/zitat-scheff-wallner-aufmacher-4094152-2-8b6dc9aee5323a4b990357d011b5ec8f.jpg" width="225" height="157" alt="6 Zitate zur Landtagswahl" /></span></div>
<!-- change to -->
<div class="Picture Left" style="height:auto;width:225px;"><span onclick="dcsAfm('afm_1_7','2014-09-23T10:19:35.000000','6 Zitate zur Landtagswahl');window.location.href='http://snowball.gentics.com/APA/snowballtest4/Zitate-Landtagswahl.html';return false;" class="link opbandit" data-opbandit-conversion='anyclick'><img src="http://cdn3.vol.at/2014/09/zitat-scheff-wallner-aufmacher-4094152-2-8b6dc9aee5323a4b990357d011b5ec8f.jpg" width="225" height="157" alt="6 Zitate zur Landtagswahl" /></span
@bmuller
bmuller / gist:9a0f313a7b6e9c4a137e
Last active August 29, 2015 14:06
vol.at image testing
<div class="Picture Left opbandit" style="height:auto;width:160px;" data-opbandit-conversion="anyclick">
<span onclick="dcsAfm('afm_1_2','2014-09-17T06:26:27.000000','Wiener Dschihadistinnen sind angeblich schwanger');window.location.href='http://www.vol.at/sind-die-wiener-is-kriegerinnen-schwanger/4088445';return false;" class="link">
<img src="http://cdn2.vol.at/2014/09/d_s-aufmacher-4088492-2-63a927fe9572ed2be910de2259a16b43.jpg" width="160" height="170" alt="Wiener Dschihadistinnen sind angeblich schwanger" />
</span>
</div>
@bmuller
bmuller / stunning.rb
Created May 17, 2014 17:58
Get IP address from public stun servers
require 'socket'
require 'timeout'
class StunClient
def initialize(host, port)
@host = host
@port = port
end
def get_ip
from robostrippy.resource import attr, attrList, Resource
class Connection(Resource):
subject = attr("h2.postingtitle")
body = attr("section#postingbody")
datetime = attr("time", attribute = "datetime")
class ConnectionListItem(Resource):
url = attr("a", attribute = 'href')
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Track conversion if user clicks (default)
////////////////////////////////////////////////////////////////////////////////////////////////////////////////
<a class="opbandit" href="/some/video" data-conversion="click">
Click Here!
</a>
// or
@bmuller
bmuller / Capfile
Last active December 17, 2015 10:28
Capfile / monit file for a node project
require 'cgi'
role :server, "1.2.3.4", "5.6.7.8"
set :repo, "git@github.com:whatever/project.git"
set :destpath, "/home/myuser/project"
set :user, "myuser"
set :ssh_options, { :forward_agent => true }
after "deploy", "restart"
@bmuller
bmuller / nytconnect
Created April 8, 2013 14:25
Connect to NYTimes wireless network
#!/bin/bash
USER=your-username
PASSWORD=your-password
DEST=$(wget "http://google.com" --no-check-certificate -O - -S -q 2>&1 | grep Location | cut -d ' ' -f 4)
if [ "$DEST" == "http://www.google.com/" ]; then
echo "You're already connected to the tubes."
exit 1
@bmuller
bmuller / gist:4169950
Created November 29, 2012 15:52
Graphite setup on ubuntu
cd /usr/src
wget http://launchpad.net/graphite/0.9/0.9.10/+download/graphite-web-0.9.9.tar.gz
wget http://launchpad.net/graphite/0.9/0.9.10/+download/carbon-0.9.10.tar.gz
wget http://launchpad.net/graphite/0.9/0.9.10/+download/whisper-0.9.10.tar.gz
tar -zxvf graphite-web-0.9.10.tar.gz
tar -zxvf carbon-0.9.10.tar.gz
tar -zxvf whisper-0.9.10.tar.gz
apt-get install apache2 apache2-utils apache2.2-bin apache2.2-common libapr1 libaprutil1 libaprutil1-dbd-sqlite3 python3.2 libpython3.2 python3.2-minimal libapache2-mod-wsgi
apt-get install libaprutil1-ldap python-cairo-dev python-django python-ldap python-memcache python-pysqlite2 sqlite3 libapache2-mod-python python-setuptools
@bmuller
bmuller / jetsetter.r
Created June 6, 2012 18:32
post on jetsetter competition
require(ggplot2)
png("images/2012-06-04-playing-for-3k-share-or-no-share/pwinning.png")
y <- c()
for (x in 1:40) y <- c(y, x/(x+1))
d <- data.frame(friends=1:40, prob_winning=y)
ggplot(d, aes(friends, prob_winning)) + geom_point(size=3) + ylab("P(winning)") + xlab("# Invited Friends")
dev.off()
png("images/2012-06-04-playing-for-3k-share-or-no-share/prob_friends.png")