This file contains hidden or 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 python3 | |
| import os | |
| import sys | |
| import time | |
| import fcntl | |
| import socket | |
| import signal | |
| import argparse | |
| import subprocess | |
| import struct |
This file contains hidden or 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
| Section "ServerLayout" | |
| Identifier "X.org Configured" | |
| Screen 0 "Screen0" 0 0 | |
| InputDevice "Mouse0" "CorePointer" | |
| InputDevice "Keyboard0" "CoreKeyboard" | |
| EndSection | |
| Section "Files" | |
| ModulePath "/usr/lib/xorg/modules" | |
| FontPath "/usr/share/fonts/X11/misc" |
This file contains hidden or 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 python3 | |
| import getpass | |
| import crypt | |
| import argparse | |
| import sys | |
| METHODS_DICT = dict((meth.name.lower(), meth) for meth in crypt.methods) | |
This file contains hidden or 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/sh | |
| wget --base=http://dl.xonotic.co/ -i maps.txt |
This file contains hidden or 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
| module Main where | |
| import Control.Monad (forM_, mapM_) | |
| import Control.Applicative ((<$>)) | |
| import Data.Bifunctor (bimap, first, second) | |
| import Data.Array.MArray (newArray, writeArray) | |
| import Data.Array.ST (runSTArray) | |
| import Data.Array (Array, bounds, (!)) | |
| import Text.Read (readMaybe) |
This file contains hidden or 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
| CC=gcc | |
| LIBS=-lpthread -lfcgi -lGeoIP | |
| CFLAGS=-Wall --std=c11 -O2 -D_POSIX_C_SOURCE=200809L | |
| DEPS=geoip_api.h http_utils.h | |
| TARGET=ip_api | |
| .PHONY: all | |
| all: $(TARGET) |
This file contains hidden or 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
| myip() { | |
| curl -4 "http://icanhazip.com/" | |
| } | |
| myip6() { | |
| curl -6 "http://icanhazip.com/" | |
| } | |
| reverse_ipv4() { | |
| local ip="$1" |
This file contains hidden or 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
| module Main where | |
| import Data.Array.IArray | |
| import Data.Tuple (swap) | |
| import System.Random | |
| import Data.List (foldl') | |
| data CoinType = Gold | |
| | Silver | |
| deriving(Show, Read, Eq, Ord, Bounded, Enum) |
This file contains hidden or 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 | |
| XONOTIC_LINUX=xonotic-glx | |
| XONOTIC_OSX="open $HOME/Downloads/Xonotic/Xonotic.app -W --args" | |
| XONOTIC_DATA_LINUX=$HOME/.xonotic/data | |
| XONOTIC_DATA_OSX="$HOME/Library/Application Support/xonotic/data" | |
| realpath() { | |
| [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}" |
This file contains hidden or 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 string_ends(text, ends) | |
| return ends == "" or string.sub(text, -string.len(ends)) == ends | |
| end | |
| function vlc_format(filename) | |
| -- https://wiki.videolan.org/VLC_Features_Formats#Format.2FContainer.2FMuxers | |
| local formats = { | |
| "3gp", "asf", "wmv", "au", "avi", "mka", "mkv", "flv", "mov", "mp4", | |
| "ogg", "ogm", "ts", "mpg", "mp3", "mp2", "msc", "msv", "nut", "ra", |