Skip to content

Instantly share code, notes, and snippets.

View marek-saji's full-sized avatar
:shipit:

Marek ‘saji’ Augustynowicz marek-saji

:shipit:
View GitHub Profile
<h1>redrice</h1>
<style>
:root
{
background-color: #fff; color: #960000;
font-size: 5em; text-align: center; font-style: italic;
}
</style>
@marek-saji
marek-saji / typescripttogif
Last active August 29, 2015 14:00 — forked from tg123/typescripttogif
convert script(1) recordings to gif
#!/bin/bash
# Changelog
# ---------
#
# origin from https://gist.github.com/tg123/6240128
# modified by marek-saji:
# - use single loop
# - skip frames delayed by 0
# - loop animation with additional delay after every loop
@marek-saji
marek-saji / .gitconfig
Created April 17, 2014 11:40
git aliases for keeping worklog in .git/worklog
[alias]
# Worklog. Separate repository kept in .git/worklog
# Initialize (bare) repository in .git/worklog
workloginit = !"\
set -e ;\
mkdir .git/worklog;\
cd .git/worklog;\
git init --bare;\
echo '*' > .gitignore;\
@marek-saji
marek-saji / 1.sh
Last active October 23, 2016 19:08
Kill all the children
#!/bin/sh
echo outer
./2.sh
echo /outer
@marek-saji
marek-saji / config
Created February 27, 2014 10:17
Add this to ~/.ssh/config to be able to connect to your koding.com VM via vm-{N}.{NAME}.koding.kd.io
Host *.kd.io
User saji
ProxyCommand ssh %[email protected] nc %h %p
" be (VI)iMproved
set nocompatible
" UTF-8, anyone?
if has("multi_byte")
if &termencoding == ""
let &termencoding=&encoding
if $TERM == "linux" || $TERM_PROGRAM == "GLterm"
let &termencoding="latin1"
elseif $TERM == "xterm" || $TERM == "xterm-color"
@marek-saji
marek-saji / dabblet.css
Last active January 1, 2016 14:59
cat draggin'
/**
* cat draggin'
*/
html,
body
{
min-height: 100%;
min-width: 100%;
margin: 0; padding: 0;
@marek-saji
marek-saji / foo.php
Last active December 30, 2015 03:49
Rubbish benchmark of design patterns for grouping functions together
<?php
/**
* Performance of design patterns for grouping functions together
*
* ^C, when you get bored.
*/
error_reporting(E_ALL);
class SomeClass
@marek-saji
marek-saji / .bashrc
Created November 18, 2013 15:12
Bootstrapped interactive php shell
phpsh () {
BOOTSTRAP_FILE="$(
DIR="$( git rev-parse --show-toplevel 2>/dev/null || echo . )"
ls "$DIR/bootstrap.php" "$DIR/scripts/foo.php" 2>/dev/null | head -n1
)"
php -a -d xdebug.cli_color=1 -d auto_prepend_file="$BOOTSTRAP_FILE" "$@"
}
@marek-saji
marek-saji / -.sh
Last active December 26, 2015 05:29
stdin in scripts
#!/bin/sh
F=/dev/stdin
while : ; do
ls -al "$F" 2>/dev/null
F=$( readlink "$F" )
[ -z "$F" ] && break
done