Skip to content

Instantly share code, notes, and snippets.

View make-github-pseudonymous-again's full-sized avatar

Notas Hellout make-github-pseudonymous-again

  • Joined on Sep 24, 2012
View GitHub Profile
@DavidGriffith
DavidGriffith / eps2svg.sh
Created March 6, 2013 07:35
EPS to SVG vector command line image converter
#!/bin/sh
# eps2svg: EPS to SVG vector command line image converter
# David Griffith <davidgriffith@acm.org>
# Created March 30, 2009 and released into the public domain
# The programs pstoedit and skencil are required.
EXT="svg"
USAGE="usage: eps2svg [-v] input.eps [output.svg]\n -v verbose mode"
@nobuoka
nobuoka / commit-built-files-to-gh-pages-branch.markdown
Last active November 22, 2019 15:38
The way to commit built files in subdirectory to gh-pages branch from an arbitrary branch

Committing a subfolder to the gh-pages branch from the other branch

Sometimes you want to commit a subfolder on an arbitrary branch (rather than gh-pages branch) as the root directory to the gh-pages branch. You will want to do so when, for example, the files to be published on GitHub Pages are generated by a build system.

This document shows the way to commit a build/gh-pages directory to the gh-pages branch by using Git plumbing commands. In the following example, Windows PowerShell is used as a shell environment.

Step 1 : Create a tree object

@henriquemenezes
henriquemenezes / nerd-tree-mappings.txt
Last active January 13, 2020 05:23
NERD tree Mappings
------------------------------------------------------------------------------
2.3. NERD tree Mappings *NERDTreeMappings*
Default Description~ help-tag~
Key~
o.......Open files, directories and bookmarks....................|NERDTree-o|
go......Open selected file, but leave cursor in the NERDTree.....|NERDTree-go|
t.......Open selected node/bookmark in a new tab.................|NERDTree-t|
T.......Same as 't' but keep the focus on the current tab........|NERDTree-T|
@usami
usami / pocket_download.sh
Created March 16, 2013 01:38
Download all entries in your Pocket (http://getpocket.com).
#!/bin/sh
# before running this script, run the following command
# wget --save-cookies cookies.txt --post-data 'feed_id=****ID****&password=****PASS****' http://getpocket.com/login_process/
i=1
while [ $i -le 60 ]
do
wget --load-cookies cookies.txt -p http://getpocket.com/unread/$i
(( i++ ))
@asmz
asmz / slack_notifier.sh
Last active March 5, 2021 07:35
slack notifier on shell
#!/bin/bash
#
# slack notifier on shell (specified channel)
# @asmz
#
# Usage
# ./slack_notifier.sh [channel_name]
#
# Configuration
# Required SLACK_API_TOKEN environment variable before open tmux.
@adityamukho
adityamukho / nginx-jail.sh
Last active April 29, 2021 03:25
Setup a CHROOT jail at `/srv/http` for a public Nginx server on Arch Linux.
#!/bin/bash
pacman -S nginx
export JAIL=/srv/http
# Create Necessary Devices
mkdir $JAIL/dev
mknod -m 0666 $JAIL/dev/null c 1 3
mknod -m 0666 $JAIL/dev/random c 1 8
mknod -m 0444 $JAIL/dev/urandom c 1 9
@coderbyheart
coderbyheart / arch-linux-intel-compute-stick.md
Created January 8, 2016 16:03
Arch Linux on Intel Compute Stick
@timvieira
timvieira / heap-sample.py
Created November 26, 2016 19:21
Fast sampling from an evolving distribution
import numpy as np
from numpy.random import uniform
def update(S, k, v):
"Update value position `k` in time O(log n)."
d = S.shape[0]
i = d//2 + k
S[i] = v
while i > 0:
anonymous
anonymous / gist:2523336
Created April 29, 2012 02:01
Changing author info
#!/bin/sh
git filter-branch --env-filter '
an="$GIT_AUTHOR_NAME"
am="$GIT_AUTHOR_EMAIL"
cn="$GIT_COMMITTER_NAME"
cm="$GIT_COMMITTER_EMAIL"
if [ "$GIT_COMMITTER_EMAIL" = "your@email.to.match" ]
@igal
igal / .vimperatorrc.local.vim
Created March 11, 2010 21:19
My Vimperator configuration
"===[ Settings ]========================================================
" Autocomplete using Firefox Awesomebar subsystem
set complete=l
" Show completions as you type? '' waits for tab, 'auto' shows them immediately
set wildoptions=''
" Select the longest autocomplete match
set wildmode='list:full'