Skip to content

Instantly share code, notes, and snippets.

View tzermias's full-sized avatar

Zacharias Tzermias tzermias

View GitHub Profile
@dominicsayers
dominicsayers / phantomjs.md
Last active November 21, 2016 01:59
Installing PhantomJS on Ubuntu

(updated version of http://www.joyceleong.com/log/installing-phantomjs-on-ubuntu/)

  1. export P=phantomjs-2.1.1-linux-x86_64
  2. cd /usr/local/share
  3. sudo curl -L -o $P.tar.bz2 https://bitbucket.org/ariya/phantomjs/downloads/$P.tar.bz2
  4. sudo tar xvf $P.tar.bz2
  5. sudo ln --force -s /usr/local/share/$P /usr/local/share/phantomjs
  6. sudo ln --force -s /usr/local/share/phantomjs/bin/phantomjs /usr/local/bin/phantomjs
  7. phantomjs --version
@yanofsky
yanofsky / LICENSE
Last active February 25, 2024 12:21
A script to download all of a user's tweets into a csv
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@pcworld
pcworld / _README.md
Last active December 8, 2023 20:22
Linux Spotify Ad Mute
@bortzmeyer
bortzmeyer / gist:2605348
Created May 5, 2012 20:21
Sample Apache's mod_security rules for rate-limiting
# Activates mod_security
SecRuleEngine On
# Only filters requests for /toto
SecRule REQUEST_FILENAME "!^/toto" "phase:1,skip:5,nolog"
# Only filters requests for rosalind
SecRule REQUEST_HEADERS:Host "rosalind\.abgenomica\.com" "phase:1,skip:5,nolog"
# Stores the number of visits in variable IP.pagecount
SecAction "phase:1,nolog,initcol:IP=%{REMOTE_ADDR},setvar:IP.pagecount=+1,expirevar:IP.pagecount=60"
# Denies requests when excessive
# 429 would be a better error status but mod_security rewrites it as 500 :-(
@nrrb
nrrb / selenium_basics.py
Created April 16, 2012 22:18
Selenium stuffs
from selenium import webdriver
profile = webdriver.FirefoxProfile()
# Set proxy settings to manual
profile.set_preference('network.proxy.type', 1)
# Set proxy to Tor client on localhost
profile.set_preference('network.proxy.socks', '127.0.0.1')
profile.set_preference('network.proxy.socks_port', 9050)
# Disable all images from loading, speeds page loading
# http://kb.mozillazine.org/Permissions.default.image
@robinsmidsrod
robinsmidsrod / _INSTALL.md
Last active March 21, 2024 23:00
Bootstrapping full iPXE native menu with customizable default option with timeout (also includes working Ubuntu 12.04 preseed install)

Add the following chunk to your existing ISC dhcpd.conf file.

if exists user-class and ( option user-class = "iPXE" ) {
    filename "http://boot.smidsrod.lan/boot.ipxe";
}
else {
    filename "undionly.kpxe";
}

(or see https://gist.github.com/4008017 for a more elaborate setup

@nisc
nisc / .tmux.conf
Created December 8, 2011 16:56
tmux config
###
### Bindings
###
unbind C-b
set -g prefix C-a
bind a send-prefix
# URL viewing
bind-key u capture-pane \; save-buffer /tmp/tmux-buffer \; run-shell "xterm -e 'cat /tmp/tmux-buffer | urlview'"