Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
#!/bin/bash | |
# | |
# Show replication lag for one or more postgresql slaves in streaming replication. | |
# | |
# dsimmons@squiz.co.uk | |
# 2012-01-09 | |
# | |
psql="which psql" | |
psql_extra_opts="" |
#On local machine | |
cd foo (your project folder parent) | |
git init | |
git add -A * (doesnt add empty folders, be carefull with netbeans config files) | |
git commit -m "My initial commit message" | |
#On local machine, in your git project | |
git remote add origin https://psychok7@bitbucket.org/psychok7/human-computer-interaction.git | |
git push origin master |
import sys | |
from urllib import urlencode | |
import requests | |
from urlparse import urlparse, parse_qs | |
from random import choice | |
import re | |
self_id = None # your facebook id here | |
utc_bday = None # utc timestamp of your birthday |
Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.
$ python -m SimpleHTTPServer 8000
Let's have some command-line fun with curl, [jq][1], and the [new GitHub Search API][2].
Today we're looking for:
Located in alphabetical order (not prefer)
C
ab
), also designed as a more modern replacement, written in C
golang
)#!/bin/bash | |
sudo apt-get install -y \ | |
build-essential git curl nano gedit vim kdiff3 ubuntu-make octave \ | |
chromium-browser fcitx cloc gtkhash p7zip gparted baobab gimp pinta uncrustify \ | |
imagemagick meshlab python-nose \ | |
muon okular python3-pyqt4 pavucontrol pulseaudio-equalizer \ | |
redshift redshift-gtk \ | |
openjdk-8-jdk nginx \ | |
xdotool tidy python-gpgme autoconf libqt5opengl5 \ |
# to enable this filter add to jail.conf following (/etc/fail2ban/jail.conf) | |
# Thanks to -> TheBarret | |
[nginx-4xx] | |
enabled = true | |
port = http,https | |
logpath = /var/log/nginx/access.log | |
maxretry = 3 |
if ($http_user_agent ~* (360Spider|80legs.com|Abonti|AcoonBot|Acunetix|adbeat_bot|AddThis.com|adidxbot|ADmantX|AhrefsBot|AngloINFO|Antelope|Applebot|BaiduSpider|BeetleBot|billigerbot|binlar|bitlybot|BlackWidow|BLP_bbot|BoardReader|Bolt\ 0|BOT\ for\ JCE|Bot\ mailto\:craftbot@yahoo\.com|casper|CazoodleBot|CCBot|checkprivacy|ChinaClaw|chromeframe|Clerkbot|Cliqzbot|clshttp|CommonCrawler|comodo|CPython|crawler4j|Crawlera|CRAZYWEBCRAWLER|Curious|Curl|Custo|CWS_proxy|Default\ Browser\ 0|diavol|DigExt|Digincore|DIIbot|discobot|DISCo|DoCoMo|DotBot|Download\ Demon|DTS.Agent|EasouSpider|eCatch|ecxi|EirGrabber|Elmer|EmailCollector|EmailSiphon|EmailWolf|Exabot|ExaleadCloudView|ExpertSearchSpider|ExpertSearch|Express\ WebPictures|ExtractorPro|extract|EyeNetIE|Ezooms|F2S|FastSeek|feedfinder|FeedlyBot|FHscan|finbot|Flamingo_SearchEngine|FlappyBot|FlashGet|flicky|Flipboard|g00g1e|Genieo|genieo|GetRight|GetWeb\!|GigablastOpenSource|GozaikBot|Go\!Zilla|Go\-Ahead\-Got\-It|GrabNet|grab|Grafula|GrapeshotCrawler|GTB5|GT\:\:WWW|Guzz |
/** | |
* This dirty, dirty script, allows you to export links from google spaces | |
* so that you don't have to do it manually before April 17th. | |
* I could not find any official way to do this so I quickly threw this script | |
* together. | |
* | |
* USAGE: | |
* 1. Place yourself on the space page you want to export | |
* (such as: https://spaces.google.com/space/XXXXXXXXXXXXXXX) | |
* |