Skip to content

Instantly share code, notes, and snippets.

View cipherself's full-sized avatar
🛠️

Mohamed Attia cipherself

🛠️
View GitHub Profile
@hSATAC
hSATAC / 256color.pl
Created July 20, 2011 14:48
256color.pl
#!/usr/bin/perl
# Author: Todd Larason <jtl@molehill.org>
# $XFree86: xc/programs/xterm/vttests/256colors2.pl,v 1.2 2002/03/26 01:46:43 dickey Exp $
# use the resources for colors 0-15 - usually more-or-less a
# reproduction of the standard ANSI colors, but possibly more
# pleasing shades
# colors 16-231 are a 6x6x6 color cube
for ($red = 0; $red < 6; $red++) {

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@kraft001
kraft001 / solarized.bash
Created June 8, 2012 05:47
solarized Gnome Terminal + Tmux + Vim
# store all solarized files in one place
mkdir ~/.solarized
cd ~/.solarized
# http://www.webupd8.org/2011/04/solarized-must-have-color-paletter-for.html
git clone https://github.com/seebi/dircolors-solarized.git
eval `dircolors ~/.solarized/dircolors-solarized/dircolors.256dark`
ln -s ~/.solarized/dircolors-solarized/dircolors.256dark ~/.dir_colors
git clone https://github.com/sigurdga/gnome-terminal-colors-solarized.git
@nikcub
nikcub / README.md
Created October 4, 2012 13:06
Facebook PHP Source Code from August 2007
@arvearve
arvearve / gist:4158578
Created November 28, 2012 02:01
Mathematics: What do grad students in math do all day?

Mathematics: What do grad students in math do all day?

by Yasha Berchenko-Kogan

A lot of math grad school is reading books and papers and trying to understand what's going on. The difficulty is that reading math is not like reading a mystery thriller, and it's not even like reading a history book or a New York Times article.

The main issue is that, by the time you get to the frontiers of math, the words to describe the concepts don't really exist yet. Communicating these ideas is a bit like trying to explain a vacuum cleaner to someone who has never seen one, except you're only allowed to use words that are four letters long or shorter.

What can you say?

@gfixler
gfixler / OpenCourseOnline
Created February 11, 2013 10:14
OpenCourseOnline youtube channel links, prettied up. These were so hard to find, and so inconsistently named.
Probabilistic Graphical Models with Professor Daphne Koller - Stanford University {{{1
01.01 - Welcome | https://www.youtube.com/watch?v=WPSQfOkb1M8
01.02 - Overview and Motivation | https://www.youtube.com/watch?v=6AVurePzK3Y
01.03 - Distributions | https://www.youtube.com/watch?v=Y1i7Tzj9YFg
01.04 - Factors | https://www.youtube.com/watch?v=5R5ixMmKQzg
02.01 - Semantics & Factorization | https://www.youtube.com/watch?v=6ODl1rxoT14
02.02 - Reasoning Patterns | https://www.youtube.com/watch?v=dSLlBMOKWF4
02.03 - Flow of Probabilistic Influence | https://www.youtube.com/watch?v=PfirsYouObw
@JeffreyWay
JeffreyWay / gist:5695346
Created June 2, 2013 23:33
And we wonder why we get overwhelmed.
So you want to accept payments online with PHP?
- Well, you probably don't want to handle that process manually. Too dangerous and risky.
- So learn the Stripe API. Works great!
- But you'll still need to setup SSL. So go learn how to do that.
- Stripe provides a PHP package, so download that through Composer. If you're not familiar with Composer, you'll need to learn that too.
- If you want the most flexibility, you'll want to manually create the payment form.
- So you'll need to send an AJAX request with a special token to Stripe's API. jQuery makes this easy, so go learn jQuery.
- Once the payment completes, you'll likely want to send the buyer a "Purchased" email, so learn how to send email.
- But don't make the user wait for the email to send. That takes too long. Add that to a background job.
@willurd
willurd / web-servers.md
Last active July 12, 2024 11:21
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@wsargent
wsargent / docker_cheat.md
Last active June 29, 2024 19:32
Docker cheat sheet
#!/usr/bin/env python
# Quick and dirty demonstration of CVE-2014-0160 by
# Jared Stafford (jspenguin@jspenguin.org)
# Modified so that it finds cookies
import sys
import struct
import socket
import time
import select