Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python
"""
Written by Steve Birstok (12-23-2020)
Happy Holidays!
"""
import os
import requests
import tarfile
import shutil

Keybase proof

I hereby claim:

  • I am haykuro on github.
  • I am haykuro (https://keybase.io/haykuro) on keybase.
  • I have a public key whose fingerprint is 34B6 6B9D B4F5 4D20 2562 E64E D3C7 7E9A 4DA5 2988

To claim this, I am signing this object:

/**
* HOW TO USE:
* 1. Go to: https://YOURTEAM.slack.com/files
* 2. Open inspector for your browser.
* 3. You'll see: 2017/6/6 22:16:45.834 User id: XXXXXXXXX, team id: XXXXXXXXX
* 4. Paste user id in to where it says "USER_ID_HERE"
* 5. Copy/paste this whole script to your console.
*/
/*global
jQuery, TS
# -*- coding: utf-8 -*-
#*
* to install the needed twitter module please run:
* pip install python-twitter
*#
import twitter
from pprint import pprint
def main():
""".."""
"""..."""
from requests import get
from requests.exceptions import ConnectionError
from netaddr import IPNetwork
from pprint import pprint
CONFIG = {
"HOST": "192.168.1.0/24",
"SCHEME": "http",
"CONNECT_TIMEOUT": 3,
# 1-liner to download wallhaven wallpapers and save to a folder.
# set the folder as your default background
# cronjob
# …
# profit
curl -s "https://alpha.wallhaven.cc/random" | egrep -o "alpha.wallhaven.cc/wallpapers/thumb/small/th-\d+.jpg" | sed 's/^/http:\/\//g' | sed 's/thumb\/small\/th/full\/wallhaven/g' | xargs wget -c -P /tmp/random_wallpapers
from urllib import urlretrieve
from zipfile import ZipFile
from os.path import isfile
ZIP_URL = 'http://s3.amazonaws.com/alexa-static/top-1m.csv.zip'
ZIP_PATH = '/tmp/top-1m.zip'
if not isfile(ZIP_PATH):
urlretrieve(ZIP_URL, ZIP_PATH)
import logging
logging.getLogger("scapy.runtime").setLevel(logging.ERROR)
from scapy.all import *
from json import dumps
from sys import argv
if len(argv) < 2:
print 'Usage:\n\t%s <your.pcap>' % (argv[0])
exit(0)
<?php
/**
* Please be aware. This gist requires at least PHP 5.4 to run correctly.
* Otherwise consider downgrading the $opts array code to the classic "array" syntax.
*/
function getMp3StreamTitle($streamingUrl, $interval, $offset = 0, $headers = true)
{
$needle = 'StreamTitle=';
$ua = 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.36';
@haykuro
haykuro / irc_bot.py
Created April 24, 2015 22:56
Written by Steve Birstok
# Actively under development
import random
import re
import socket
import string
import sys
HOST = PORT = NICK = None