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
function find_components(header) | |
{ | |
var url = document.url(); | |
var components = url.split("/"); | |
var end = header ? components.length : components.length-1; | |
components = components.slice(3, end); | |
var cut = -1; | |
for ( cut = components.length-1; cut >= 0; cut-- ) | |
if ( components[cut] == "src" || components[cut] == "include" ) |
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 python | |
import sys | |
from argparse import ArgumentParser | |
from PIL import Image | |
import svgwrite | |
def pix2char(image, x, y, palette): | |
try: | |
l, a = image.getpixel((x, y)) |
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 | |
echo "This script will determine the future of all humanity" | |
read -n 1 -s -r -p $'Press \x1b[1mANY\x1b[m key to continue\n' | |
read -n 1 -s -r -p $'Do you want humanity to survive? [Y|n]\n' hooman | |
if [ "$hooman" = "n" ] | |
then | |
read -n 1 -s -r -p $'You are about to kill all humans, confirm? [y|N]\n' confirm | |
if [ "$confirm" = "y" ] | |
then |
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 python | |
class Tape(object): | |
def __init__(self, data="", blank=None): | |
self.tape = dict(enumerate(data)) | |
self.pos = 0 | |
self.blank = blank | |
def move_right(self): |
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 python | |
import sys | |
import math | |
word = sys.argv[1] if len(sys.argv) > 1 else "loss" | |
rlen = 3 + len(word) | |
spacing = " " * int(math.floor(rlen / 3)) | |
for letter in word: |
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 | |
INPUT_DIR=~/.xonotic/data | |
OUTPUT_DIR=$(pwd) | |
# @brief Prints a list of files in a pk3 | |
# @param $1 pk3 name | |
function pk3_files() |
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
# pip install lottie cairosvg | |
import io | |
import re | |
import sys | |
import enum | |
import math | |
import json | |
import lottie | |
import pathlib | |
import argparse |
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 | |
SERVER='localhost' | |
PORT='26000' | |
PASSWORD='foo' | |
SECURE=0 | |
SECURE_PORT="1234" | |
RCON_HEADER=$(echo -e "\xff\xff\xff\xff") | |
ESCAPE_CHAR=$(echo -en "\x1b") |
OlderNewer