Skip to content

Instantly share code, notes, and snippets.

View Efreak's full-sized avatar
😴
😪😴🥱😌💤

Efreak Efreak

😴
😪😴🥱😌💤
View GitHub Profile
@dupuy
dupuy / README.rst
Last active April 23, 2024 23:38
Common markup for Markdown and reStructuredText

Markdown and reStructuredText

GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.

@agnoster
agnoster / README.md
Last active April 6, 2024 22:35
My ZSH Theme

agnoster.zsh-theme

A ZSH theme optimized for people who use:

  • Solarized
  • Git
  • Unicode-compatible fonts and terminals (I use iTerm2 + Menlo)

For Mac users, I highly recommend iTerm 2 + Solarized Dark

@FabienArcellier
FabienArcellier / matrix.html
Created March 17, 2013 14:05
This snippet generate matrix falling code. I got it by unobfuscate those code. Look at it it's impressive : http://timelessname.com/sandbox/matrix.html
<html>
<head>
<script language="javascript">
function matrix_on_load()
{
s=window.screen,w=q.width=s.width,h=q.height=s.height,m=Math.random;
// Initialize the number of columns
for(p=[],i=0;i<256;p[i++]=0);
@jvavrik
jvavrik / thematrix
Created April 4, 2013 13:51
The matrix
//<canvas id=canvas>
//original source : http://timelessname.com/sandbox/matrix.html
//set the canvas to take the entire screen
canvas.height = window.screen.height;
canvas.width = window.screen.width;
//one entry in the array per column of text
//each value represent the current y position of the column. (in canvas 0 is at the top and positive y values go downward)
var columns = []
for (i = 0; i < 256; columns[i++] = 1);
@willurd
willurd / web-servers.md
Last active April 26, 2024 18:00
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
@aras-p
aras-p / preprocessor_fun.h
Last active April 12, 2024 17:24
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@mzabriskie
mzabriskie / README.md
Last active February 5, 2024 15:10
Check git status of multiple repos

If you're like me you have a dir like ~/Workspace/Github where all your git repos live. I often find myself making a change in a repo, getting side tracked and ending up in another repo, or off doing something else all together. After a while I end up with several repos with modifications. This script helps me pick up where I left off by checking the status of all my repos, instead of having to check each one individually.

Usage:

git-status [directory]

This will run git status on each repo under the directory specified. If called with no directory provided it will default to the current directory.

@Apsu
Apsu / gpg-pam-exec
Last active August 22, 2022 14:55
PAM-integrated GPG-agent with passphrase presetting
#!/usr/bin/env bash
# grab PAM-provided auth token
read token
# grab our user, $USER isn't always set
USER="$(id -un)"
# switch to PAM_USER if passed, buffer return value
$([[ "$PAM_USER" != "$USER" ]] && echo su - "$PAM_USER" -s) /usr/local/bin/gpg-preset-passphrase <<< "$token"
@thedjpetersen
thedjpetersen / plugin.css
Last active August 29, 2015 13:56
Plugin to make links clickable
/* plugin css */
@blackfyre
blackfyre / intervalManager.js
Created May 23, 2014 11:28
An interval manager for javascript
/**
* Original by Zirak @ http://stackoverflow.com/a/8636050/1012431
*
* Had some issues with the clear function
*
* @type {{intervals: Array, make: make, clear: clear, clearAll: clearAll}}
*/
var interval = {
//to keep a reference to all the intervals
intervals : [],