Skip to content

Instantly share code, notes, and snippets.

View afterdesign's full-sized avatar
🏠
Working from home

Rafał Malinowski afterdesign

🏠
Working from home
View GitHub Profile
@afterdesign
afterdesign / gist:2919906
Last active October 6, 2015 02:28
Sublime Text 2 Settings

Package Control for Sublime Text 2/3

First things first go to http://sublime.wbond.net and install package control.

Sublime settings:

Sublime User Preferences:

{
	"auto_match_enabled": false,
{
"repositories" : [
{
"type": "composer",
"url": "http://packages.zendframework.com/"
}
],
"require": {
"php": ">=5.3.3",
"zendframework/zendframework": "1.12.*"
@afterdesign
afterdesign / gist:4056065
Created November 11, 2012 20:01
Working sudo without password.
visudo
user ALL=(ALL) NOPASSWD: ALL
@afterdesign
afterdesign / scantofile-0.2.4-0.sh
Last active December 13, 2015 21:48
Brother scan to tiff and create pdf.
#! /bin/sh
set +o noclobber
#
# $1 = scanner device
# $2 = friendly name
#
#
# 100,200,300,400,600
#
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
single_body_task = {
    "task" : "math.tasks.add",
    "kwargs" : {
        "a" : 1,
        "b" : 2
    },
    "id" : sha1(json_encode(single_body_task['kwargs']))
}
Making install in completions
for file in aclocal-1.11 ; do \
rm -f ./$file && \
ln -s aclocal ./$file ; \
done
for file in phing ; do \
rm -f ./$file && \
ln -s ant ./$file ; \
done
for file in asciidoc.py ; do \
@afterdesign
afterdesign / hack.sh
Created June 24, 2013 12:36 — forked from erikh/hack.sh
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@afterdesign
afterdesign / test.py
Created July 15, 2013 15:50
Problem with paths in compiled python.
import sys
sys.path.append("/usr/lib/python2.7/lib-dynload/")
import bz2
SHELL := bash
environment := $(shell echo $(env) | tr a-z A-Z)
PRODUCTION_HOST = 0.0.0.0
TESTING_HOST = 1.1.1.1
rsync_or_smth = \
echo $($(environment)_HOST)