Skip to content

Instantly share code, notes, and snippets.

bsdshell /
Last active June 4, 2024 19:50
python http server, http json, python http json, python http post
from http.server import BaseHTTPRequestHandler, HTTPServer
import socketserver
import json
import cgi
import sqlite3
DATE: Mon Jun 3 19:51:44 2024

this guide may be outdated for MacOS versions beyond 10.14 Mojave (and implied Xcode versions)


Table of Contents

bsdshell / SnakeHS.hs
Created November 5, 2023 09:20 — forked from kreed131/SnakeHS.hs
SnakeHS - OpenGL Snake game on Haskell
import Graphics.UI.GLUT
import Data.IORef
import Data.List (delete)
import System.Random (randomRIO)
import Control.Monad (forM_, when)
type Coord = (Int, Int)
type Snake = (Direction, [Coord])
type SnakeDigestion = [Coord]
type Food = [Coord]
bsdshell /
Created December 11, 2022 05:34 — forked from russelldb/
tmux cheatsheet

tmux cheat sheet

(C-x means ctrl+x, M-x means alt+x)

Prefix key

The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf:

remap prefix to Control + a

bsdshell /
Created December 2, 2022 04:22 — forked from sundowndev/
Google dork cheatsheet

Google dork cheatsheet

Search filters

Filter Description Example
allintext Searches for occurrences of all the keywords given. allintext:"keyword"
intext Searches for the occurrences of keywords all at once or one at a time. intext:"keyword"
inurl Searches for a URL matching one of the keywords. inurl:"keyword"
allinurl Searches for a URL matching all the keywords in the query. allinurl:"keyword"
intitle Searches for occurrences of keywords in title all or one. intitle:"keyword"
bsdshell /
Created July 8, 2022 07:24 — forked from fnky/
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27

Contract Killer 3

Revised date: 07/11/2012

Between us [company name] and you [customer name]


We’ll always do our best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.

bsdshell / OpenGL_glfw-b_tutorial1.hs
Created June 24, 2021 23:58 — forked from naoto-ogawa/OpenGL_glfw-b_tutorial1.hs
Haskell OpenGL Tutorial Rewrite for GLFW-b
-- rewrite for GLFW-b
import Graphics.Rendering.OpenGL as GL
import Graphics.UI.GLFW as GLFW
import Control.Monad
import System.Exit ( exitWith, ExitCode(..) )
import System.Environment ( getArgs)
bsdshell / state.hs
Created February 12, 2021 09:39 — forked from sdiehl/state.hs
State monad implementation + example
import Control.Monad
-- State Monad Implementation
newtype State s a = State { runState :: s -> (a,s) }
instance Monad (State s) where
return a = State $ \s -> (a, s)
bsdshell / electron-floating-window.js
Created October 16, 2019 23:16 — forked from geekeren/electron-floating-window.js
electron Floating Window
let floatingWindow;
const createFloatingWindow = function() {
const electron = require('electron');
const BrowserWindow = electron.BrowserWindow;
if (!floatingWindow) {
floatingWindow = new BrowserWindow({
width: 1000,
height: 80,
titleBarStyle: 'hide',
transparent: true,