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 collections import defaultdict | |
word = 'KELNER' | |
rev_word = word[::-1] | |
side = 16 | |
def groups(data, func): | |
grouping = defaultdict(list) | |
for y in range(len(data)): |
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/env bash | |
# | |
# adwaita-shell - extracts and saves default Adwaita shell theme for GNOME. | |
# Requires gnome-tweaks and User Themes extension. | |
# Also sudo apt install font-cantarell for default fonts. | |
# sorebit, https://github.com/sorebit | |
# | |
# Note: This seems to be deprecated since on new GNOME even Ubuntu allows you to pick the default accent color for Adwaita. | |
# Safety |
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
""" | |
Usage: python3 clear_logs.py {{ full container ID }} | |
Clears the log file of any lines which are not valid JSON. | |
No error handling whatsoever. Use at own risk. | |
""" | |
import json | |
import pathlib | |
import shutil |
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
<!DOCTYPE html> | |
<meta charset="utf-8"/> | |
<title>💧</title> | |
<style type="text/css"> | |
* {margin: 0; padding: 0;} | |
canvas {position: absolute; left: 0; top: 0;} | |
body {overflow: hidden;} | |
#main {background: #235d80; z-index: 1;} | |
</style> | |
<canvas id="main"></canvas> |
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
""" | |
Turns a json exported from pinboard.in into a folder of Obsidian-compliant .md notes | |
Usage: | |
python p2o.py <export.json path> <out folder> | |
""" | |
import contextlib | |
import dateutil | |
from enum import Enum | |
from pathlib import Path |
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
#cs ---------------------------------------------------------------------------- | |
AutoIt Version: 3.3.14.5 | |
Author: https://github.com/sorebit | |
Script Function: | |
This is a Club Penguin AFK gold digger. | |
Usage: | |
1. Open cponline.pw/play in full window. | |
2. Scroll down. |
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
<head> | |
<meta charset="utf-8"> | |
</head> | |
<button id="button">Save scene</button> | |
<script> | |
// Original source: http://jsfiddle.net/4ooupev9/126/ | |
function handleDownload() { |
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
.inesprg 1 ; 1x 16KB PRG code | |
.ineschr 1 ; 1x 8KB CHR data | |
.inesmap 0 ; mapper 0 = NROM, no bank swapping | |
.inesmir 1 ; background mirroring | |
;;;;;;;;;;;;;;; | |
;; DECLARE SOME VARIABLES HERE | |
.rsset $0000 ;;start variables at ram location 0 | |
gamestate .rs 1 ; .rs 1 means reserve one byte of space |
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
// Stolen from https://github.com/skilldrick/easy6502/blob/gh-pages/simulator/assembler.js | |
function openPopup(content, title) { | |
let w = window.open('', title, 'width=500,height=300,resizable=yes,scrollbars=yes,toolbar=no,location=no,menubar=no,status=no'); | |
let html = "<html><head>"; | |
html += "<link href='style.css' rel='stylesheet' type='text/css' />"; | |
html += "<title>" + title + "</title></head><body>"; | |
html += "<pre><code>"; | |
html += content; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>File uploader</title> | |
</head> | |
<body> | |
<form id="uploadForm" enctype="multipart/form-data" action="/api/status" method="post"> | |
<input type="file" name="user-upload" /> | |
<input type="submit" value="Upload File" name="submit"> | |
</form> |
NewerOlder