Skip to content

Instantly share code, notes, and snippets.

@scumola
scumola / src-domains.uniq.by-freq.txt
Last active January 15, 2020 17:08
url shorteners/redicters found in the 2019 2% twitter stream (domains that had urls tweeted which responded with a 301 or 302 redirect)
119154 bit.ly
29522 t.co
6175 dlvr.it
3466 dingtone.me
2789 youtu.be
2701 ow.ly
1809 talkyou.me
1622 twitch.tv
1616 tylt.it
1533 whounfollowedme.org

Keybase proof

I hereby claim:

  • I am scumola on github.
  • I am stevewebb (https://keybase.io/stevewebb) on keybase.
  • I have a public key whose fingerprint is 7B25 218D 3793 8D15 66FD B536 EB84 F4ED 77EB C9DD

To claim this, I am signing this object:

#!/usr/bin/python
from bs4 import BeautifulSoup as BS
import requests
import re
import time
import sys
import gspread
from oauth2client.service_account import ServiceAccountCredentials
scope = "https://spreadsheets.google.com/feeds"
@scumola
scumola / gist:1650258
Created January 20, 2012 23:38
aws php sdk list all instances in all regions
<?php
error_reporting(0);
header("Content-type: text/html; charset=utf-8");
require_once '../sdk.class.php';
$ec2 = new AmazonEC2();
$response = $ec2->describe_regions();
foreach ($response->body->regionInfo->item as $item) {
$region_endpoint = (string) $item->regionEndpoint;
$region_name = (string) $item->regionName;
$ec2->set_hostname($region_endpoint);
$ node index.js kat.torrent ~/Downloads/ 8080
/Users/stevenwebb/Downloads/torrent-peek/index.js:58
ffi.Callback('void', ['pointer', 'string', 'string'], (alert, msg, type) => {
^
SyntaxError: Unexpected token >
at Module._compile (module.js:439:25)
at Object.Module._extensions..js (module.js:474:10)
at Module.load (module.js:356:32)
at Function.Module._load (module.js:312:12)
@scumola
scumola / pet-snippet.toml
Last active April 5, 2017 22:56
description
[[snippets]]
description = "Get my public IP"
command = "curl ifconfig.co"
output = ""
[[snippets]]
description = "Check SSL start and end dates"
command = "echo | openssl s_client -connect badcheese.com:443 2>/dev/null | openssl x509 -dates -noout"
output = ""
@scumola
scumola / rc.iptables
Created April 5, 2011 02:56
My home iptables rules
#!/bin/sh
LOCALNET="10.0.0.0/255.255.255.0"
iptables -F
iptables -X
iptables -F -t nat
iptables -X -t nat
# setting default policy
iptables -P INPUT DROP
iptables -P OUTPUT ACCEPT
iptables -P FORWARD ACCEPT
@scumola
scumola / eb-csshx.bash
Last active July 22, 2016 20:22
csshx-beanstalk.bash
#!/bin/bash
if [ "$#" -ne 1 ];
then echo "USAGE: $0 <EB Environment Name>"
exit
fi
rm /tmp/csshx-hosts.txt &> /dev/null
for id in `/usr/local/bin/aws elasticbeanstalk describe-environment-resources --output text --environment-name $1 | grep INSTANCES | awk '{print $2}'` ;
do
ids+=$(echo $id|tr '\n' ' ')
done
@scumola
scumola / gist:bfd9775c246f71ca93deb363292aa9bb
Created July 15, 2016 17:26
radish.calls fluentd payload example (sanitized)
{
"request_params" : {
"uuid" : "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"controller" : "api/v20/egi",
"maxcount" : 10000,
"nkey" : "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"fields" : "start_date_time,end_date_time,name,description,episode_description,episode_title,theme,channel_hd_fl,is_new,service_id,network_affiliate_name,images.poster_url,images.program_logo_url,upid,original_air_date,service_unique_id,run_time,egid_for_sge,tms_id,tv_rating,mpaa_rating,channel_information.is_hd,channel_information.callsign,channel_information.channel_image,channel_information.channel,sport_team_home_id,sport_team_away_id,images.home_team_image_url,images.away_team_image_url,kind,slug",
"unlocked_user_networks" : [
1,
2,
<?xml version="1.0" encoding="UTF-8"?>
<!--
HERITRIX 3 CRAWL JOB CONFIGURATION FILE
This is a relatively minimal configuration suitable for many crawls.
Commented-out beans and properties are provided as an example; values
shown in comments reflect the actual defaults which are in effect
if not otherwise specified specification. (To change from the default
behavior, uncomment AND alter the shown values.)