This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Change the path to your desired directory | |
directory="/home/michael/Pictures/Screenshots" | |
# Function to process the screenshots | |
process_screenshot() { | |
path=$1 | |
file=$2 | |
url=$(/home/michael/bin/hepgg "$path/$file") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from dataclasses import dataclass, field | |
from typing import List, Union | |
@dataclass | |
class Node: | |
group: str | |
num: str | |
peers: List['Node'] = field(default_factory=list) | |
routes: List['Route'] = field(default_factory=list) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sqlalchemy import Column, Integer, String, DateTime | |
from sqlalchemy.ext.declarative import declarative_base | |
Base = declarative_base() | |
class Line(Base): | |
__tablename__ = 'logs' | |
id = Column(Integer, primary_key=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
cd /mnt/c/Users/Michael | |
./ictl.ps1 $(~/tools/ictl.py $1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
from sys import argv | |
print({"play": 0, "pause": 1, "next": 2, "prev": 3}[argv[1]]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/mnt/c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe | |
if ((Get-Process itunes -ea SilentlyContinue) -eq $Null) {'{"error": "iTunes: not running"}' | |
} | |
else { | |
$itunes = New-Object -ComObject itunes.application | |
$ctl = {$itunes.Play()},{$itunes.Pause()},{$itunes.NextTrack()},{$itunes.PreviousTrack()} | |
& $ctl[$args[0]] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3.6 | |
from bottle import route, run | |
import phtml as p | |
from html import escape | |
page = p.Grid('page') | |
header = p.Element( | |
'div', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from random import shuffle | |
serial = [n for n in range(15)] | |
shuffle(serial) | |
class Node: | |
def __init__(self, parent, val): | |
self.parent = parent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name My Fancy New Userscript | |
// @version 0.1 | |
// @match http://www.okcupid.com/* | |
// @copyright 2012+, Yazdmich | |
// @require http://code.jquery.com/jquery-1.10.2.js | |
// @require http://code.jquery.com/ui/1.11.2/jquery-ui.js | |
// ==/UserScript== | |
this.$ = this.jQuery = jQuery.noConflict(true); | |
function httpGet(theUrl) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ram | |
jumps = {'JMP': 'C0', | |
'JZ': 'C1', | |
'JNZ': 'C2', | |
'JS': 'C3', | |
'JNS': 'C4', | |
'JO': 'C5', | |
'JNO': 'C6'} | |
table = { |