Skip to content

Instantly share code, notes, and snippets.

View a2nt's full-sized avatar

Tony Air a2nt

View GitHub Profile
Join Astropad URL:
http://mush.twinoid.com/?astroId=*YOUR_ASTROPAD_ID*&astroKey=*YOUR_ASTROPAD_KEY*
External Astropad URL:
http://astropad.sunsky.fr/?gid=*YOUR_ASTROPAD_ID*&rkey=*YOUR_ASTROPAD_KEY*&language=en
Add items URL:
http://astropad.sunsky.fr/api.py/addItems?tid=1&hid=*Character_ID*&gid=*YOUR_ASTROPAD_ID*&gkey=*YOUR_ASTROPAD_KEY*&data=*ITEMS_DATA*
@a2nt
a2nt / Astropad faker script
Created April 14, 2014 15:04
Astropad faker
// ==UserScript==
// @name Anti-AstroPad
// @version 0.01
// @grant GM_xmlhttpRequest
// @grant GM_addStyle
// @match http://mush.vg/*
// @match http://mush.vg/#
// @match http://mush.twinoid.com/*
// @match http://mush.twinoid.com/#
// @match http://mush.twinoid.es/*
@a2nt
a2nt / CreateTypographyTestingPage
Created October 26, 2016 16:37
SilverStripe task to create typography testing page
<?php
class CreateTypographyTestingPage extends BuildTask
{
protected $title = 'Create Typography Testing Page';
public function run($request)
{
$page = Page::create();
$page->Title = 'Typography Testing Page';
@a2nt
a2nt / imageresize
Last active October 26, 2016 16:39
Resize site images one by one to 1900x1200 to save some space
#!/bin/sh
#
# Resizes all images in current directory to max size 1900x1200
#
echo "Resizing images to 1900x1200"
for line in $(find . -iname '*.png'); do
// ==UserScript==
// @name moonwalk Video Ads Remover
// @namespace http://tampermonkey.net/
// @version 0.1
// @description When I watch movies only video player ads makes me cry they're blocked by AdBlock, but I can't start play a video without waiting for 14 sec
// @author You
// @match http://moonwalk.cc/*/iframe*
// @match http://logethy.com/*/frame*
// @match http://moonwalk.center/*/iframe*
// @grant none
@a2nt
a2nt / generate-nginx-iblock
Last active November 25, 2016 18:48
Updates and converts iblocklist.com to nginx conf
#!/usr/bin/env sh
# Required: ipcalc to convert IP Ranges to IP CIDR format supported by nginx
# http://ipcalc.readthedocs.io/en/latest/
# Debian based installation: apt install ipcalc
get_blacklist(){
wget $1 -O /tmp/iblocklist.gz
gzip -d /tmp/iblocklist.gz
grep -o '^[^#]*' /tmp/iblocklist | awk -F ":" 'NF {system("ipcalc " $2 " | tail -1 | xargs echo -n"); print " 1;"}' >> /tmp/iblock-list.conf
@a2nt
a2nt / categorize-photos.sh
Last active March 1, 2018 07:45
Categorizing images by EXIF date or by file creation date if EXIF is missing
#!/usr/bin/env bash
SOURCE_DIR="${HOME}/Pictures/Photos/DCIM_SYNCED"
DEST_DIR="${HOME}/Pictures/Photos/Archived"
echo "Categorizing files from ${SOURCE_DIR} to ${DEST_DIR} ..."
## Find files and categorize them
find "${SOURCE_DIR}" -type f -regex ".*/.*\.\(jpg\|JPG\|jpeg\|JPEG\|png\|PNG\)" |
while IFS= read -r file; do
@a2nt
a2nt / gist:c97182f9dbaa158d2f1dde646fa2f43b
Created March 17, 2018 09:29
D-Link DIR-853 firmware binwalk
binwalk firmware.bin
DECIMAL HEXADECIMAL DESCRIPTION
--------------------------------------------------------------------------------
0 0x0 uImage header, header size: 64 bytes, header CRC: 0xBA54E809, created: 2018-03-16 13:51:16, image size: 1724041 bytes, Data Address: 0x80001000, Entry Point: 0x803A10C0, data CRC: 0x4D6C3FBC, OS: Linux, CPU: MIPS, image type: OS Kernel Image, compression type: lzma, image name: "DIR_853_MT7621AT"
64 0x40 LZMA compressed data, properties: 0x5D, dictionary size: 8388608 bytes, uncompressed size: 5007808 bytes
1769472 0x1B0000 Squashfs filesystem, little endian, version 4.0, compression:xz, size: 8560882 bytes, 2327 inodes, blocksize: 524288 bytes, created: 2018-03-16 13:51:10
@a2nt
a2nt / block tracking
Last active April 14, 2018 04:43
My tracking block list
freegeoip.net^$important
intercom.io^$important
openstat.net/cnt.js^$important
yastatic.net/share2/share.js^$important
top-fwz1.mail.ru^$important
ad.mail.ru^$important
an.yandex.ru^$important
ads.adfox.ru^$important
||advarkads.com^$important
@a2nt
a2nt / gist:05ea7f77eeec51eff68ff61877b9c58b
Last active April 27, 2018 07:19
Route Russian websites without VPN
#!/bin/sh
#########################################################################################################
## WARNING: Script maybe outdated use following github repository:
## https://github.com/a2nt/russian-routing
#########################################################################################################
# Routes RU-servers traffic without VPN
# Must be launched as root after connecting to VPN
# sudo ./routing.sh
#