Skip to content

Instantly share code, notes, and snippets.

Thomas Niepraschk niepi

View GitHub Profile
@niepi
niepi / invoice.css
Last active Jan 2, 2016
Markdown Rechnung mit einen Stylesheet für Marked.app und einen Textexpander FillIn Snippet
View invoice.css
/*
This document has been created with Marked.app <http://markedapp.com>, Copyright 2011 Brett Terpstra
Please leave this notice in place, along with any additional credits below.
---------------------------------------------------------------
Title: Invoice Niepi
Author: Thomas Niepraschk
Description: Basic invoice template.
*/
body {
View crashplan.freenas.md

How-to : Crashplan & Freenas

Pre-requisites

Install

Step 0: Skip if you are using existing install

View php-switch
#!/bin/bash
# php switch for homebrew
# $ brew tap josegonzalez/php && brew install php53 --with-mysql && brew install php54 --with-mysql
# Might as well ask for password up-front, right?
sudo -v
VERSION_FILE="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/php-switch.version"
View apn-server.php
<?php
$apnsHost = 'gateway.sandbox.push.apple.com';
$apnsCert = 'apns-dev.pem';
$apnsPort = 2195;
$streamContext = stream_context_create();
stream_context_set_option($streamContext, 'ssl', 'local_cert', $apnsCert);
$apns = stream_socket_client('ssl://' . $apnsHost . ':' . $apnsPort, $error, $errorString, 2, STREAM_CLIENT_CONNECT, $streamContext);
@niepi
niepi / gist:5576098
Last active Dec 17, 2015 — forked from chen206/gist:4030441
Install Postgres 9.2 on a clean Ubuntu 12.04
View gist:5576098
#!/bin/bash
#
# Install Postgres 9.2 on a clean Ubuntu 12.04
"""
LC_ALL issue
comment out the AcceptEnv LANG LC_* line in the remote /etc/ssh/sshd_config file.
sudo apt-get install language-pack-en-base
sudo dpkg-reconfigure locales
comment out the SendEnv LANG LC_* line in the local /etc/ssh/ssh_config file.
@niepi
niepi / niepi.zsh-theme
Created Jul 30, 2012
oh-my-zsh / themes / niepi.zsh-theme
View niepi.zsh-theme
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
PROMPT='%{$fg[green]%}%c \
$(git_prompt_info)\
%{$fg[red]%}%(!.#.»)%{$reset_color%} '
PROMPT2='%{$fg[red]%}\ %{$reset_color%}'
RPS1='%{$fg[blue]%}%~%{$reset_color%} ${return_code} '
# ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}:: %{$fg[yellow]%}("
# ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%} "
View .osx
# ~/.osx — http://mths.be/osx
###############################################################################
# General UI/UX #
###############################################################################
# Set computer name (as done via System Preferences → Sharing)
scutil --set ComputerName "MathBook Pro"
scutil --set HostName "MathBook Pro"
scutil --set LocalHostName "MathBook-Pro"
@niepi
niepi / gist:3081713
Created Jul 10, 2012 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts
View gist:3081713

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@niepi
niepi / php.rb
Created Jul 4, 2012 — forked from everzet/php.rb
php 5.4 formula for homebrew
View php.rb
require 'formula'
def mysql_installed?
`which mysql_config`.length > 0
end
def postgres_installed?
`which pg_config`.length > 0
end
View packages.json
{
"packages": {
"smarty/smarty":{
"name": "smarty/smarty",
"version": "3.1.7",
"version_normalized": "3.1.7",
"dist": {
"url": "http://www.smarty.net/files/Smarty-3.1.7.zip",
"type": "zip"
"reference": null,
You can’t perform that action at this time.