Skip to content

Instantly share code, notes, and snippets.

View gam-phon's full-sized avatar

Yaser Alraddadi gam-phon

View GitHub Profile
@virtualstaticvoid
virtualstaticvoid / iptables_rules.sh
Created June 14, 2011 08:58
25 Most Frequently Used Linux IPTables Rules Examples
# Modify this file accordingly for your specific requirement.
# http://www.thegeekstuff.com
# 1. Delete all existing rules
iptables -F
# 2. Set default chain policies
iptables -P INPUT DROP
iptables -P FORWARD DROP
iptables -P OUTPUT DROP
@JoshuaEstes
JoshuaEstes / 000-Cheat-Sheets.md
Last active February 11, 2024 04:25
Developer Cheat Sheets for bash, git, gpg, irssi, mutt, tmux, and vim. See my dotfiles repository for extra info.
@brandonb927
brandonb927 / osx-for-hackers.sh
Last active April 27, 2024 18:27
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
@lawlesst
lawlesst / cleaner.py
Created November 19, 2012 14:29
cleaning invalid characters from xml
def invalid_xml_remove(c):
#http://stackoverflow.com/questions/1707890/fast-way-to-filter-illegal-xml-unicode-chars-in-python
illegal_unichrs = [ (0x00, 0x08), (0x0B, 0x1F), (0x7F, 0x84), (0x86, 0x9F),
(0xD800, 0xDFFF), (0xFDD0, 0xFDDF), (0xFFFE, 0xFFFF),
(0x1FFFE, 0x1FFFF), (0x2FFFE, 0x2FFFF), (0x3FFFE, 0x3FFFF),
(0x4FFFE, 0x4FFFF), (0x5FFFE, 0x5FFFF), (0x6FFFE, 0x6FFFF),
(0x7FFFE, 0x7FFFF), (0x8FFFE, 0x8FFFF), (0x9FFFE, 0x9FFFF),
(0xAFFFE, 0xAFFFF), (0xBFFFE, 0xBFFFF), (0xCFFFE, 0xCFFFF),
(0xDFFFE, 0xDFFFF), (0xEFFFE, 0xEFFFF), (0xFFFFE, 0xFFFFF),
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active April 19, 2024 11:00
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@jpetazzo
jpetazzo / postgresql.changefile
Last active December 16, 2015 20:39
PostgreSQL for dotcloud-builder
from ubuntu:precise
run LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get install -y -q postgresql-9.1 postgresql-contrib-9.1
copy postgresql.run /init
@ragingwind
ragingwind / Backend Architectures Keywords and References.md
Last active April 17, 2024 10:51
Backend Architectures Keywords and References
@jbenet
jbenet / simple-git-branching-model.md
Last active April 9, 2024 03:31
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@neilstuartcraig
neilstuartcraig / ghost-ses-smtp-config
Created October 17, 2013 14:08
An extract of config.js for ghost (http://ghost.org) blog app (nodejs) to allow sending email via SES (over SSL). Note that this will fail if your website is not return-connectable by SES on your defined ghost URL i.e. your blog must be publicily available, not just runnnig on e.g. a private VM. If you're running under HTTPS then your SSL cert m…
mail: {
transport: 'SMTP',
host: 'ssl://email-smtp.us-east-1.amazonaws.com',
options: {
port: 465,
service: 'SES',
auth: {
user: 'YOUR-SES-ACCESS-KEY-ID',
pass: 'YOUR-SES-SECRET-ACCESS-KEY'
}
@ricardo-rossi
ricardo-rossi / ElasticSearch.sh
Last active December 1, 2023 04:55
Installing ElasticSearch on Ubuntu 14.04
#!/bin/bash
### USAGE
###
### ./ElasticSearch.sh 1.7 will install Elasticsearch 1.7
### ./ElasticSearch.sh will fail because no version was specified (exit code 1)
###
### CLI options Contributed by @janpieper
### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch