Skip to content

Instantly share code, notes, and snippets.

@manveru
manveru / pong.go
Created April 26, 2010 18:52
A simple game of Pong written in Go.
package main
import (
"sdl"
"math"
"time"
"rand"
"flag"
"fmt"
)
@tuxfight3r
tuxfight3r / 01.bash_shortcuts_v2.md
Last active July 16, 2026 01:40
Bash keyboard shortcuts

Bash Shortcuts

visual cheetsheet

Moving

command description
ctrl + a Goto BEGINNING of command line
@oubiwann
oubiwann / appify.sh
Last active March 18, 2026 14:18 — forked from advorak/appify.sh
appify — create the simplest possible Mac app from a shell script (adds an application icon)
#!/usr/bin/env bash
VERSION=4.0.1
SCRIPT=`basename "$0"`
APPNAME="My App"
APPICONS="/System/Library/CoreServices/CoreTypes.bundle/Contents/Resources/GenericApplicationIcon.icns"
OSX_VERSION=`sw_vers -productVersion`
PWD=`pwd`
function usage {
@jimfoltz
jimfoltz / tw5-server.rb
Last active June 11, 2026 09:24
A local server for TiddlyWiki5 that allows saving wiki.
require 'webrick'
require 'fileutils'
BIND_ADDRESS = "127.0.0.1"
PORT = 8080
BACKUP_DIR = 'bak'
if ARGV.length != 0
root = ARGV.first.gsub('\\', '/')
@flowchartsman
flowchartsman / kali_osx_persistence_wifi.md
Last active May 30, 2024 06:53 — forked from widdowquinn/kali_osx_persistence_wifi.md
Kali Linux Live USB with encrypted persistence and wireless on Macbook Pro/Air without networking.

Kali Linux Bootable USB with Persistence and Wireless on OSX

Tutorials for running live Kali on OSX often require you have networking on your laptop to apt install the drivers, but without an ethernet adapter you're not going to be able to do that, so this tutorial will cover a method of doing this manually, using another thumbdrive or external data source.

Download the appropriate Kali Linux .iso

I used a 64 bit .iso image, downloaded via HTTP.

@munificent
munificent / generate.c
Last active July 8, 2026 11:40
A random dungeon generator that fits on a business card
#include <time.h> // Robert Nystrom
#include <stdio.h> // @munificentbob
#include <stdlib.h> // for Ginny
#define r return // 2008-2019
#define l(a, b, c, d) for (i y=a;y\
<b; y++) for (int x = c; x < d; x++)
typedef int i;const i H=40;const i W
=80;i m[40][80];i g(i x){r rand()%x;
}void cave(i s){i w=g(10)+5;i h=g(6)
+3;i t=g(W-w-2)+1;i u=g(H-h-2)+1;l(u
@m-radzikowski
m-radzikowski / script-template.sh
Last active July 1, 2026 17:56
Minimal safe Bash script template - see the article with full description: https://betterdev.blog/minimal-safe-bash-script-template/
#!/usr/bin/env bash
set -Eeuo pipefail
trap cleanup SIGINT SIGTERM ERR EXIT
script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P)
usage() {
cat <<EOF
Usage: $(basename "${BASH_SOURCE[0]}") [-h] [-v] [-f] -p param_value arg1 [arg2...]
@LilithWittmann
LilithWittmann / autobahn.md
Last active January 14, 2025 12:25
autobahn.md
@rileytestut
rileytestut / ExportIPA.swift
Last active July 5, 2026 15:08
Export Swift Playgrounds .ipa
import Foundation
// Export running app as .ipa, then return path to exported file.
// Returns String because app crashes when returning URL from async function for some reason...
func exportIPA() async throws -> String
{
// Path to app bundle
let bundleURL = Bundle.main.bundleURL
// Create Payload/ directory
@tzuntar
tzuntar / gopher2html.pl
Created January 1, 2022 15:34
Simple gophermap to HTML converter
#!/usr/bin/env perl
# Gopher2Html - Gophermap parser
# v1.0 (c) 2021 by Tobija Žuntar
use warnings;
use strict;
use feature qw(switch);
no warnings qw(experimental::smartmatch);
sub parse_line {
my ($line) = @_;