Skip to content

Instantly share code, notes, and snippets.

@niepi
niepi / .tm_properties
Created December 19, 2011 10:16
tm2 config file
# Basic Settings
#
fontName = "Menlo"
fontSize = 12
# Extra files to include
#
myExtraIncludes = ".tm_properties,.htaccess,.gitignore"
fileBrowserGlob = "{*,$myExtraIncludes}"
include = "{$include,$myExtraIncludes}"
@niepi
niepi / .tm_properties
Created December 19, 2011 10:17
tm2 config file
# Basic Settings
#
fontName = "Menlo"
fontSize = 12
# Extra files to include
#
myExtraIncludes = ".tm_properties,.htaccess,.gitignore"
fileBrowserGlob = "{*,$myExtraIncludes}"
include = "{$include,$myExtraIncludes}"
@niepi
niepi / .gitignore
Created January 13, 2012 11:26 — forked from bkeepers/.gitignore
My Sublime settings
*
@niepi
niepi / brettquix.txt
Created June 28, 2012 16:50 — forked from ttscoff/brettquix.txt
Brett's Quix File
@Brett's searches
@Brett's custom searches
go https://duckduckgo.com/?q=%21%20%s Open first result (DuckDuckGo)
b https://duckduckgo.com/?q=%21%s Bang search (DuckDuckGo)
grep https://www.cueup.com/?q=%s&fq=1 Greplin
ss https://duckduckgo.com/site:%d%20%s Current site (DuckDuckGo)
bt https://duckduckgo.com/site:brettterpstra.com%20%s BrettTerpstra.com (DuckDuckGo)
gh http://github.com/search?q=%s&type=Everything&repo=&langOverride=&start_value=1 Search GitHub (everything)
hints http://hints.macworld.com/search.php?query=%s&keyType=all&datestart=&dateend=&topic=0&type=stories&results=50&mode=search Search Mac OS X Hints
mu http://www.macupdate.com/find/mac/%s Search MacUpdate (Software)
{
"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,
@niepi
niepi / php.rb
Created July 4, 2012 12:57 — forked from everzet/php.rb
php 5.4 formula for homebrew
require 'formula'
def mysql_installed?
`which mysql_config`.length > 0
end
def postgres_installed?
`which pg_config`.length > 0
end
@niepi
niepi / gist:3081713
Created July 10, 2012 07:01 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

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 / niepi.zsh-theme
Created July 30, 2012 20:18
oh-my-zsh / themes / 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%} "
@niepi
niepi / gist:5576098
Last active December 17, 2015 07:49 — forked from chen206/gist:4030441
Install Postgres 9.2 on a clean Ubuntu 12.04
#!/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.
<?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);