Skip to content

Instantly share code, notes, and snippets.

Anthony Madhvani octagonal

  • EU, Belgium
Block or report user

Report or block octagonal

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Semantic voting
Sup ilias
*Semantic voting*. You should be able to easily select a section/paragraph of a post/comment,
and vote on it specifically. Instead of voting/liking a complete post
(which probably contains things you agree with as well as things you disagree with),
you can select a word/sentence, and express your agreement.
Downvoting a word could be used to point out grammatical errors, which leads to
View TPB Structuur
Magnet link:
table#searchResult tbody tr:first-child td:nth-child(4) a [node href attribute]
table#searchResult tbody tr:first-child td:nth-child(2) a [node text]<query>/0/<sorting mode>/<category>
201 : films
207 : HD-films
octagonal /
Last active Dec 21, 2015
Curl Imgur for valid URLs using random string from /dev/urandom
# Get the string from /dev/urandom (from ~/bin/get_rand)
# The -c flag for head indicates the amount of bytes I want to see returned.
# In this case this correlates to the amount of characters I want returned.
function random {
export rand=$(
LC_CTYPE=C tr -dc a-zA-Z0-9 < /dev/urandom | head -c 7| xargs
View gist:6300976
" Disable arrow keys.
map <up> <nop>
map <down> <nop>
map <left> <nop>
map <right> <nop>
imap <up> <nop>
imap <down> <nop>
imap <left> <nop>
imap <right> <nop>
octagonal /
Created Aug 25, 2013
Substitute in a file according to a pattern and save it back to that file, while at the same time making a backup called %file%.back
#You don't need to use / as a delimiter, especially not when it's not convenient.
sudo sed -i.back 's#<img src="#<img src="' book.html
View query.json
"name": "Aphex Twin Discography 320kbps",
"magnet": "magnet:?xt=urn:btih:b35c01a402ed620e3574dd71528b7483a4fcb5f9&dn=Aphex+Twin+Discography+320kbps&",
"uploader": {
"name": "nrs321"
"date": "01-11 02:31",
"size": "2.14 GiB",
"category": {
octagonal /
Last active Dec 25, 2015
This bash script will give you superpowers
#!/usr/bin/env bash
function superpower {
echo $(curl -Is | grep Location | cut -d / -f 5 | sed "s/_/ /g")
echo "Your superpowers for today are: " > $HOME/super.txt
for (( c=1; c<=$count; c++ ))
octagonal /
Last active Dec 27, 2019
Fast + Simple 4chan Image Downloader
# Every time you use this, Moot sheds a single manly tear. Please use it sparingly if at all.
echo -e "(curl)\t\t Downloading thread"
curl -s$1 -o thread.html
echo -e "(grep -Po)\t Finding images "
cat thread.html | grep -Po '(?<=fileThumb" href=")\S+(?=")' > img
echo -e "(sed)\t\t Extracting image links"
octagonal / getarg
Last active Aug 29, 2015
Get explanations for command line options for most shell commands
View getarg
# See what arguments do without having to go through a man page
# This only works on man pages that have an "options summary" section or something similar
# The expected format is thus: {whitespace}{flag,optional multichar flag}{whitespace}{short explanation}
man $1 > $tmp
octagonal / getspeed
Created Jun 1, 2014
Simple webserver speed measuring
View getspeed
# $1 => filename to write to
# $2 => URL to fetch
# $3 => Amount of time in-between measurements
while true; do
echo -n $(date +%H:%M:%S) | tee -a $1; echo -n ";" | tee -a $1;
echo -n $(curl -o /dev/null -s -w "%{time_total}" $2 |sed "s/\./,/") | tee -a $1; echo "" | tee -a $1;
sleep $3;
You can’t perform that action at this time.