Skip to content

Instantly share code, notes, and snippets.

@myano
myano / signups.py
Created Sep 29, 2011
Old QuakeNet Signups module for jenni
View signups.py
#!/usr/bin/env python
"""
signups.py - Signups Module
Copyright 2011 - Michael Yanovich, yanovich.net
Licensed under the Eiffel Forum License 2.
This module collects a list of names by people who type ".signup"
and then displays them.
"""
@myano
myano / supercombiner.sh
Created Jul 23, 2011 — forked from sbp/supercombiner.sh
Supercombiner pasteboard script for Linux
View supercombiner.sh
#!/bin/bash
python -c '
import sys, unicodedata
s = "u"
for i in xrange(1, 3000):
if unicodedata.category(unichr(i)) == "Mn":
s += unichr(i)
if len(s) > 100: break
sys.stdout.write(s.encode("utf-8"))
@myano
myano / irc_games.md
Last active Feb 26, 2022
This is a list of games that are playable on IRC.
View irc_games.md

List of on-IRC games

AlphaChat

  • #multirpg

BakaShiMoe

@myano
myano / index.md
Last active Aug 25, 2021
Merging forked gists into your gist to preserve the history of the gist.
View index.md

Merging A Forked Gist Into Your Gist

Let's say you have a gist (public or private) and someone forks it and makes changes to it. Awesome! However, now you want to merge in their changes to your gist. Unfortunately, it doesn't seem GitHub supports this via their website at the moment, however, you can still merge the gists with 'git' on the command line.

  1. You want to clone your gist. You can locate the link for this under "Clone this gist"

     ➜  ~/dev » git clone https://gist.github.com/5315168.git
     Cloning into '5315168'...
    

remote: Counting objects: 6, done.

@myano
myano / main.py
Created Aug 9, 2011
This file queries NOAA's severe weather alert ATOM feeds and displays each alert. One must provide the 6-digit FIPS code for the county. This code is pretty crude and was whipped up pretty quickly.
View main.py
#!/usr/bin/env python
import feedparser
loc = raw_input("Please input county code: ")
feed_url = 'http://alerts.weather.gov/cap/wwaatmget.php?x=%s' % (loc)
feed = feedparser.parse(feed_url)
for x in feed.entries:
a = x["title"]
@myano
myano / cs.py
Created Jun 30, 2011
Quick example of ncurses in Python!
View cs.py
#!/usr/bin/env python
import curses
import curses.textpad
import time
stdscr = curses.initscr()
#curses.noecho()
#curses.echo()
@myano
myano / feeds-science
Created Dec 9, 2020
RSS feed list for `CarlSagan` in ##science on freenode
View feeds-science
5|BBC - Science & Enviroment (video)|http://feeds.bbci.co.uk/news/video_and_audio/science_and_environment/rss.xml
7|BBC - Science & Environmen|http://feeds.bbci.co.uk/news/science_and_environment/rss.xml
4|NPR - Science|https://www.npr.org/rss/rss.php?id=1007
7|Ars Technica - Science|http://feeds.arstechnica.com/arstechnica/science
13|Scientific American|http://rss.sciam.com/basic-science
5|Reuters|https://feeds.feedspot.com/infiniterss.php?followfeedid=81905&q=site:http%3A%2F%2Ffeeds.reuters.com%2Freuters%2FscienceNews
5|NSF - Discoveries|http://www.nsf.gov/rss/rss_www_discoveries.xml
2|NYT - Science|https://rss.nytimes.com/services/xml/rss/nyt/Science.xml
4|NYT - Space|https://rss.nytimes.com/services/xml/rss/nyt/Space.xml
4|NIST|https://www.nist.gov/news-events/news/rss.xml
View wsl.md

These steps assume you have already gone through the steps of enabling the Linux Subsystem for Windows 10 and that you have installed a distribution, prferrably a Debian-based distribution such as Ubuntu.

  1. Install VcXsrv Windows X Server, https://sourceforge.net/projects/vcxsrv/
  2. Install WSL
    1. To install WSL, Open a Powershell as Administrator
    2. Run Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
    3. Reboot
  3. Open up a "Command Prompt" on Windows.
  4. Run lxrun /install /y
View archiveteam_google.md

ArchiveTeam

Notes

Please change any reference to 'yano' to your own username.

Setting Up VMs

I would spin up a Hetzner cloud and run the following series of commands on a new VM; and then move on to the next one.

View achiveteam.md
for i in {0002..0099}; do /sbin/ip -6 addr add 2a01:aaaa:bbbb:cccc::$i/128 dev eth0; done
curl -L https://wtfismyip.com/text
apt update; apt -y upgrade; apt -y install apt-transport-https ca-certificates curl gnupg2 software-properties-common git-core libgnutls28-dev libgnutls30 screen lua5.1 liblua5.1-0 liblua5.1-0-dev python-dev python-pip bzip2 zlib1g-dev unzip python-setuptools build-essential flex autoconf python-gnutls atop htop rsync dnsutils; curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - && add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable"; apt update; apt -y install docker-ce; systemctl restart docker && for i in {8001..8015}; do docker run --detach --env DOWNLOADER="yano" --env SELECTED_PROJECT="auto" --env CONCURRENT_ITEMS="6" --publish $i:8001 --restart always archiveteam/warrior-dockerfile; done