Skip to content

Instantly share code, notes, and snippets.

View sairuk's full-sized avatar

sairuk sairuk

View GitHub Profile
@kshimi
kshimi / iceberg.json
Created September 6, 2019 09:17
Iceberg color scheme for Windows Terminal
{
"name": "Iceberg",
"foreground": "#c6c8d1",
"background": "#161821",
"black": "#161821",
"red": "#e27878",
"green": "#b4be82",
"yellow": "#e2a478",
"blue": "#84a0c6",
"purple": "#a093c7",
@JBlond
JBlond / bash-colors.md
Last active April 19, 2025 20:25 — forked from iamnewton/bash-colors.md
The entire table of ANSI color codes.

Regular Colors

Value Color
\e[0;30m Black
\e[0;31m Red
\e[0;32m Green
\e[0;33m Yellow
\e[0;34m Blue
\e[0;35m Purple
@cracyc
cracyc / NEATEvolve.lua
Last active July 31, 2024 06:35
NEATEvolve MAME
-- MarI/O by SethBling
-- Feel free to use this code, but please do not redistribute it.
-- usage: mame nes smb1 -window -autoboot_script NEATEvolve.lua
-- create savestate 1 at the start of the level you want it to learn
local Filename
local ButtonNames
local Game
local pool
@gbaman
gbaman / HowToOTGFast.md
Last active April 11, 2025 22:53
Simple guide for setting up OTG modes on the Raspberry Pi Zero, the fast way!

Setting up Pi Zero OTG - The quick way (No USB keyboard, mouse, HDMI monitor needed)

More details - http://blog.gbaman.info/?p=791

For this method, alongside your Pi Zero, MicroUSB cable and MicroSD card, only an additional computer is required, which can be running Windows (with Bonjour, iTunes or Quicktime installed), Mac OS or Linux (with Avahi Daemon installed, for example Ubuntu has it built in).
1. Flash Raspbian Jessie full or Raspbian Jessie Lite onto the SD card.
2. Once Raspbian is flashed, open up the boot partition (in Windows Explorer, Finder etc) and add to the bottom of the config.txt file dtoverlay=dwc2 on a new line, then save the file.
3. If using a recent release of Jessie (Dec 2016 onwards), then create a new file simply called ssh in the SD card as well. By default SSH i

--[[--Street Fighter II hitbox viewer]]
--[[--February 20, 2012]]
--[[--http://code.google.com/p/mame-rr/wiki/Hitboxes]]
boxes = {
["vulnerability"] = {color = 0x7777FF, fill = 0x40, outline = 0xFF},
["attack"] = {color = 0xFF0000, fill = 0x40, outline = 0xFF},
["proj. vulnerability"] = {color = 0x00FFFF, fill = 0x40, outline = 0xFF},
["proj. attack"] = {color = 0xFF66FF, fill = 0x40, outline = 0xFF},
["push"] = {color = 0x00FF00, fill = 0x20, outline = 0xFF},
@cracyc
cracyc / sf2.json
Last active February 21, 2024 21:12
sf2 lua cheats
[{
"space":{
"cpup":{
"type":"program",
"tag":":maincpu"
}
},
"script":{
"on":" --[[--Street Fighter II hitbox viewer]]\n --[[--February 20, 2012]]\n --[[--http://code.google.com/p/mame-rr/wiki/Hitboxes]]\n \n boxes = {\n [\"vulnerability\"] = {color = 0x7777FF, fill = 0x40, outline = 0xFF},\n [\"attack\"] = {color = 0xFF0000, fill = 0x40, outline = 0xFF},\n [\"proj. vulnerability\"] = {color = 0x00FFFF, fill = 0x40, outline = 0xFF},\n [\"proj. attack\"] = {color = 0xFF66FF, fill = 0x40, outline = 0xFF},\n [\"push\"] = {color = 0x00FF00, fill = 0x20, outline = 0xFF},\n [\"weak\"] = {color = 0xFFFF00, fill = 0x40, outline = 0xFF},\n [\"throw\"] = {color = 0xFFFF00, fill = 0x40, outline = 0xFF},\n [\"throwable\"] = {color = 0xF0F0F0, fill = 0x20, outline = 0xFF},\n [\"air throwable\"] = {color = 0x202020, fill = 0x20, outline = 0xFF},\n }\n \n globals = {\n axis_color = 0xFFFFFFFF,\n blank_color = 0xFFFFFFFF,\n axis_size = 12,\n mini_ax
@gbaman
gbaman / HowToOTG.md
Last active March 26, 2025 10:11
Simple guide for setting up OTG modes on the Raspberry Pi Zero

Raspberry Pi Zero OTG Mode

Simple guide for setting up OTG modes on the Raspberry Pi Zero - By Andrew Mulholland (gbaman).

The Raspberry Pi Zero (and model A and A+) support USB On The Go, given the processor is connected directly to the USB port, unlike on the B, B+ or Pi 2 B, which goes via a USB hub.
Because of this, if setup to, the Pi can act as a USB slave instead, providing virtual serial (a terminal), virtual ethernet, virtual mass storage device (pendrive) or even other virtual devices like HID, MIDI, or act as a virtual webcam!
It is important to note that, although the model A and A+ can support being a USB slave, they are missing the ID pin (is tied to ground internally) so are unable to dynamically switch between USB master/slave mode. As such, they default to USB master mode. There is no easy way to change this right now.
It is also important to note, that a USB to UART serial adapter is not needed for any of these guides, as may be documented elsewhere across the int

@miguelmota
miguelmota / README.md
Last active January 6, 2025 03:43
Multiple accounts with Mutt E-Mail Client (gmail example)

How to set up multiple accounts with Mutt E-mail Client

Thanks to this article by Christoph Berg

Instructions

Directories and files

~/
@johntyree
johntyree / getBlockLists.sh
Last active April 19, 2025 05:13
Make one large blocklist from the bluetack lists on iblocklist.com
#!/usr/bin/env sh
# Download lists, unpack and filter, write to stdout
curl -s https://www.iblocklist.com/lists.php \
| sed -n "s/.*value='\(http:.*=bt_.*\)'.*/\1/p" \
| xargs wget -O - \
| gunzip \
| egrep -v '^#'
@dkinzer
dkinzer / commands
Created April 18, 2012 16:30
Building Mutt that works with Gmail on Centos.
wget ftp://ftp.mutt.org/mutt/devel/mutt-1.5.21.tar.gz
tar -xzvf mutt-1.5.21.tar.gz
cd mutt-1.5.21
yum install ncurses-devel tokyocabinet-devel openssl-devel cyrus-sasl-devel
./configure --enable-imap --enable-smtp --enable-hcache --with-ssl --with-sasl | grep error
make
make install