Skip to content

Instantly share code, notes, and snippets.

View hsoc's full-sized avatar

John Economou hsoc

View GitHub Profile
@ukos-git
ukos-git / install-office2013.sh
Last active May 6, 2022 17:44
install microsoft office 2013 pro
#!/bin/bash
check_wine() {
if ! wine --version | grep -e 'wine-2'
then
echo "consider installing wine-2.1"
apt-cache policy wine32 wine-development
exit 1
fi
}
@AlexKott
AlexKott / gist:ba43547cbc3f5171007de3eb434592fa
Last active January 7, 2020 09:21
Export links from Google Spaces
/*
Inspired by https://gist.github.com/daniele-rapagnani/2e7372210726b28aec8f0d2d1d149ffb
This script selects all links on a Google Spaces page with url, title and date.
Reload the page for every space and scroll down to the end (until it says
"The end is just a new beginning.").
Open the browser's console (right click -> inspect -> "Console") and paste these lines.
It then logs it to a HTML string which you can copy and save as "spaces-exports.html".
When changing to another service (e.g. Dropmark, Pocket ...) you can use the html file
@daniele-rapagnani
daniele-rapagnani / dump_google_spaces.js
Created March 1, 2017 10:55
Quick and dirty snippet for exporting links from Google Spaces
/**
* 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)
*
@hans2103
hans2103 / server.badbots
Last active May 8, 2024 17:33
NGINX to block bad bots. (add Twenga|TwengaBot if you want to exclude them too)
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
@AysadKozanoglu
AysadKozanoglu / jail.conf
Last active November 2, 2023 00:31
fail2ban nginx 404 400 403 444 filter /etc/fail2ban/filter.d/nginx-4xx.conf enable
# 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
@xenialaq
xenialaq / essential_packages.sh
Last active November 12, 2017 01:11
Ubuntu Setup (Ubuntu MATE 17.10)
#!/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 \
@denji
denji / http-benchmark.md
Last active May 22, 2024 16:24
HTTP(S) Benchmark Tools / Toolkit for testing/debugging HTTP(S) and restAPI (RESTful)
@jasonrudolph
jasonrudolph / 00-about-search-api-examples.md
Last active April 30, 2024 19:21
5 entertaining things you can find with the GitHub Search API
@willurd
willurd / web-servers.md
Last active May 23, 2024 20:20
Big list of http static server one-liners

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.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@naiquevin
naiquevin / thankyou.py
Last active September 16, 2020 16:09
Python script to thank people who sent birthday wishes on facebook
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