This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 = [ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
~ $ 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... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LET page = DOCUMENT("https://github.com/trending") | |
FOR row IN ELEMENTS(page, ".Box-row") | |
LET repo = LTRIM(ATTR_GET(ELEMENT(row, "h2>a"), "href").href, "/") | |
LET url = FMT("https://github.com/{}", repo) | |
LET desc = TRIM(FIRST(APPEND(INNER_TEXT_ALL(row, "p"), ""))) | |
LET lang = TRIM(FIRST(APPEND(INNER_TEXT_ALL(row, "span[itemprop='programmingLanguage']"), ""))) | |
LET stars = TO_INT(SUBSTITUTE(TRIM(INNER_TEXT(row, "a[href$='stargazers']")), ",", "")) | |
LET forks = TO_INT(SUBSTITUTE(TRIM(INNER_TEXT(row, "a[href$='forks']")), ",", "")) | |
LET users = ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
OlderNewer