Skip to content

Instantly share code, notes, and snippets.

View vimagick's full-sized avatar
🐰
🐰🐰🐰🐰🐰🐰🐰🐰🐰

K̶e̶v̶i̶n̶ vimagick

🐰
🐰🐰🐰🐰🐰🐰🐰🐰🐰
View GitHub Profile
fs = require('fs');
page = require('webpage').create();
url = 'http://stackoverflow.com/users/348785/kev';
cjf = '/Users/kev/cookies.txt';
function load_cookies(cjf){
f = fs.open(cjf, 'r');
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from twisted.internet import defer, reactor, task
from twisted.web.client import getPage
import json
import redis
import logging
ps = [
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from twisted.internet import defer, reactor, task
from twisted.web.client import getPage
from ipaddress import ip_address
import os
import csv
import json
import logging
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from libmproxy.flow import Response
from netlib.odict import ODictCaseless
from selenium import webdriver
from selenium.webdriver.firefox.firefox_profile import FirefoxProfile
def start(ctx, argv):
#!/usr/bin/env python
# mitmproxy script to turn images upside down
def contains(x, y):
return any(y in i for i in x)
def request(content, flow):
hd = flow.request.headers
@vimagick
vimagick / gist:332100c8ab80d2ca6bd2
Created February 22, 2016 02:41
Use docker-machine to provision AlarmPi
~ $ docker-machine create -d generic --generic-ip-address 192.168.1.200 --generic-ssh-user root --generic-ssh-key ~/.ssh/id_rsa alarmpi
Running pre-create checks...
Creating machine...
(alarmpi) Importing SSH key...
Waiting for machine to be running, this may take a few minutes...
Detecting operating system of created instance...
Waiting for SSH to be available...
Detecting the provisioner...
Provisioning with arch...
Copying certs to the local machine directory...
@vimagick
vimagick / imdb-top-250.tsv
Last active July 3, 2023 11:06
IMDB Top 250 (2023-07-03)
rank title year rate titleid
1 The Shawshank Redemption 1994 9.2 tt0111161
2 The Godfather 1972 9.2 tt0068646
3 The Dark Knight 2008 9.0 tt0468569
4 The Godfather Part II 1974 9.0 tt0071562
5 12 Angry Men 1957 9.0 tt0050083
6 Schindler's List 1993 8.9 tt0108052
7 The Lord of the Rings: The Return of the King 2003 8.9 tt0167260
8 Pulp Fiction 1994 8.8 tt0110912
9 The Lord of the Rings: The Fellowship of the Ring 2001 8.8 tt0120737
@vimagick
vimagick / imdb-top-1000.tsv
Last active May 24, 2024 09:32
IMDB Top 1000 (2024-05-24)
id title year rating votes genres
tt0111161 The Shawshank Redemption 1994 9.3 2898037 Drama
tt0068646 The Godfather 1972 9.2 2019075 Crime,Drama
tt0468569 The Dark Knight 2008 9 2879307 Action,Crime,Drama
tt0167260 The Lord of the Rings: The Return of the King 2003 9 1984683 Action,Adventure,Drama
tt0108052 Schindler's List 1993 9 1455136 Biography,Drama,History
tt0071562 The Godfather Part II 1974 9 1367888 Crime,Drama
tt0050083 12 Angry Men 1957 9 868247 Crime,Drama
tt0110912 Pulp Fiction 1994 8.9 2226994 Crime,Drama
tt0120737 The Lord of the Rings: The Fellowship of the Ring 2001 8.9 2012887 Action,Adventure,Drama
#!/bin/bash
ufw status | awk '/telegram/ && /DENY FWD/{print $1}' | xargs -rt -n1 -I{} ufw route delete deny to {}
ufw status | awk '/telegram/ && /DENY OUT/{print $1}' | xargs -rt -n1 -I{} ufw rule delete deny out to {}
curl -s https://core.telegram.org/resources/cidr.txt | grep -v :: | xargs -rt -n1 -I{} ufw route insert 1 deny to {} comment telegram
curl -s https://core.telegram.org/resources/cidr.txt | grep -v :: | xargs -rt -n1 -I{} ufw rule insert 1 deny out to {} comment telegram