Skip to content

Instantly share code, notes, and snippets.

View mtimkovich's full-sized avatar
🐢

Max Timkovich mtimkovich

🐢
View GitHub Profile
@mtimkovich
mtimkovich / emojifier.go
Created October 11, 2018 20:42
Convert your documents to emoji
package main
import (
"fmt"
"strings"
"github.com/cespare/argf"
)
var alphamoji = map[rune]string{
@mtimkovich
mtimkovich / netplay.py
Last active February 14, 2019 01:24
fake netplay codes
import string
from random import choice
print(''.join(choice(string.hexdigits[:-6]) for _ in range(8)))
@mtimkovich
mtimkovich / cryptomoji.js
Created September 27, 2017 22:27
Cryptomoji - Encrypt messages as emoji
var emoji = require('node-emoji')
var emojiList = emoji.search('');
function emojiNum(emoji) {
for (var i = 0; i < emojiList.length; i++) {
if (emojiList[i].key === emoji) {
return i;
}
}
@mtimkovich
mtimkovich / tiltcontrols.py
Last active September 11, 2017 21:12
Type stuff in Overwatch
#!/usr/bin/python
import argparse
from autopy3 import key
parser = argparse.ArgumentParser(description='Type garbage in chat')
parser.add_argument('msg', nargs='+', help='message to type')
args = parser.parse_args()
key.tap(key.K_RETURN)
key.type_string(' '.join(args.msg))
@mtimkovich
mtimkovich / cpps.sh
Created June 29, 2017 22:35
like go run but for c++
cpps() {
exe=/tmp/$(basename $1 .cpp)
g++ -std=c++11 -g -O0 $1 -o $exe || return 1
if [ -z "$2" ]
then
$exe
else
$exe "${@:2}"
@mtimkovich
mtimkovich / HashMap.cpp
Last active July 2, 2017 23:20
Remaking hash tables
#include <iostream>
#include <vector>
template <class K, class V>
class HashMap;
template <class K, class V>
class Entry {
K const key;
V value;
@mtimkovich
mtimkovich / curling.py
Last active February 15, 2019 17:51
Make url requests from yaml file
#!/usr/bin/env python3
"""
Usage: curling.py input.yml
The input yaml file is structured like this. |method| is optional,
but must be lowercase.
url: url
method: get
params:
PS1="[\u@\h \W]\$ "
alias ..="cd .."
alias ls="ls -GAF"
alias cp='cp -vi'
alias mv='mv -vi'
alias rm='rm -vi'
mdc()
{
@mtimkovich
mtimkovich / like.js
Last active September 18, 2023 13:01
Facebook Like Bot
// Run in developer console
// var likes = document.getElementsByClassName('UFILikeLink _4x9_'); // Just for posts
var likes = document.getElementsByClassName('UFILikeLink'); // For all likes
(function clicker (links) {
setTimeout(() => {
links[0].click();
if (links.length > 1) {
clicker(links.slice(1));
@mtimkovich
mtimkovich / move_mouse.py
Last active January 16, 2017 19:22
Keep Ernest's Computer awake
#!/usr/bin/python
import autopy
import time
# Requires autopy from https://github.com/msanders/autopy
def move(x, y):
try:
autopy.mouse.move(x, y)
time.sleep(1)