Skip to content

Instantly share code, notes, and snippets.

@impiaaa
impiaaa / update repositories.sh
Created October 10, 2012 16:19
Updates every repository in a folder. Supports CVS, SVN, Mercurial, Git, and Bazaar.
#!/bin/bash
# update repos.sh
#
#
# Created by Spencer Alves on 9/16/10.
# Copyright 2012 Spencer Alves. All rights reserved.
CVSUP="cvs update"
SVNUP="svn update"
import pymclevel, sys, numpy
MCEDIT = False
if sys.version_info[0] < 3:
input = raw_input
def info(format, *args, **kwargs):
sys.stdout.write(format.format(*args, **kwargs)+"\n")
def warning(format, *args, **kwargs):
@impiaaa
impiaaa / PKGBUILD
Last active August 29, 2015 14:18
Godot Binary PKGBUILD
# Maintainer: Spencer Alves <>
# Contributor: Jorge Araya Navarro <>
# Contributor: Cristian Porras <>
# Contributor: Matthew Bentley <>
pkgname=godot
pkgver=1.1
pkgrel=3
pkgdesc="An advanced, feature packed, multi-platform 2D and 3D game engine"
url="http://www.godotengine.org"
@impiaaa
impiaaa / homoglyphs.txt
Created June 23, 2017 04:53
Unicode homoglyph secret message encoder/decoder
ᅟᅠ          ㅤ
!ǃ!
"″"
$$
%%
&&
''
(﹝(
)﹞)
*⁎*
import re, random, sys, os
def randrepl(matchobj):
if "matrix" in s[matchobj.start()-30:matchobj.start()]: return matchobj.group(0)
v = float(matchobj.group(2))
v = random.gauss(v, 0.1)
return matchobj.group(1)+"%.3f"%v
pat = re.compile("([, (])(-?[0-9]+(\.[0-9]+)?)")
s = open(sys.argv[1]).read()
@impiaaa
impiaaa / arithmetic test.py
Created December 2, 2017 00:37
Python 3 function arithmetic
from arithmetic import *
@arithmetic
def foo(thing):
print(greeting, thing, "!")
foo()
foo("world")
foo.greeting = "Hello"
foo.greeting
@impiaaa
impiaaa / findadmins.py
Last active January 11, 2019 18:57
Mastodon tools
#!/usr/bin/env python3
from mastodon import Mastodon
from bs4 import BeautifulSoup
import urllib
myinstance = "somewhere.social"
m = Mastodon(client_id="…", client_secret="…", access_token="…", api_base_url="https://"+myinstance)
myid = m.account_verify_credentials()['id']
admins = {}
@impiaaa
impiaaa / fla2.py
Last active October 23, 2023 15:06
FLA to SVG converter
from xml.dom import minidom
import sys
from xml.sax.saxutils import quoteattr, escape
import math, numpy
class Scanner:
def __init__(self, data):
self.data = data
self.pos = 0
@impiaaa
impiaaa / aprilwords.txt
Last active October 23, 2023 15:06
April 1 word list for @domainhacker@botsin.space
# https://github.com/dariusk/corpora/blob/master/data/words/strange_words.json
cubersome
dingleberry
doodlesack
expat
flabergasted
floccinaucinihilipilification
jentacular
kardashian
macrosmatic
import dis, inspect, typing
import math, sys
from operator import or_
from functools import reduce
#def putchar(n: int) -> int: pass
def fact(n: int) -> int:
if n <= 1: return 1
else: return n*fact(n-1)