Skip to content

Instantly share code, notes, and snippets.

View sairuk's full-sized avatar

sairuk sairuk

View GitHub Profile
@yura
yura / pdf2jpg.sh
Created November 10, 2010 15:18
script to PDF to JPG using pdftk and imagemagick
#!/bin/bash
# Script to convert PDF file to JPG images
#
# Dependencies:
# * pdftk
# * imagemagick
PDF=$1
@kamermans
kamermans / fail2ban-allstatus.sh
Created July 11, 2011 17:06
Show status of all fail2ban jails at once
#!/bin/bash
JAILS=`fail2ban-client status | grep "Jail list" | sed -E 's/^[^:]+:[ \t]+//' | sed 's/,//g'`
for JAIL in $JAILS
do
fail2ban-client status $JAIL
done
@kaleb
kaleb / aliases
Created October 15, 2011 15:51
Gmail on Mutt
#~/.mutt/aliases
alias nick Nicholas Levandoski <[email protected]>
alias tim Timothy Pitt <[email protected]>
alias steven Steven Jackson <[email protected]>
alias kaleb Kaleb Hornsby <[email protected]>
alias alug-admin nick, tim, steven
@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
@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 '^#'
@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

~/
@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

@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
--[[--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},
@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