Skip to content

Instantly share code, notes, and snippets.

View typeoneerror's full-sized avatar
🤠
iOS, Capacitor, Ember, Vue, Rails

Benjamin Borowski typeoneerror

🤠
iOS, Capacitor, Ember, Vue, Rails
View GitHub Profile
@typeoneerror
typeoneerror / pages-watermark.md
Created December 28, 2011 19:35
How to create a global watermark in Apple Pages.
  • Go to Format > Advanced and check "Make Master Objects Selectable".
  • Drop the image you want to use as your watermark into the document.
  • With the image selected, under "Wrap" options in the "Inspector" select "In Background" as "Object Placement".
  • Check that "Background objects are selectable".
  • Go back to Format > Advanced and check "Move Object to Section Master".
  • Uncheck "Background objects are selectable"

Your image is now the background image for all pages and is essentially a watermark.

@typeoneerror
typeoneerror / psql.sql
Created January 6, 2012 21:33
grouping, counting
select
date(created_at) as the_date,
extract(day from created_at) as the_day,
count(id) as count_all
from results
group by the_date, the_day
order by the_date;
@typeoneerror
typeoneerror / Default (OSX).sublime-keymap
Created January 10, 2012 22:49
sublime text 2 keymaps
[
// textmate duplicate line
{ "keys": ["ctrl+shift+d"], "command": "duplicate_line" },
// textmate close all files
{ "keys": ["ctrl+super+w"], "command": "close_all" },
// textmate wordwrap
{ "keys": ["super+alt+w"], "command": "toggle_setting", "args": {"setting": "word_wrap"} },
// xcode quick open
{ "keys": ["super+shift+o"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} }
]
@typeoneerror
typeoneerror / Bash.sublime-build
Created January 11, 2012 20:18
Bash build system for running currently open script in Sublime Text 2
{
"cmd" : ["$file"],
"selector" : "source.shell",
"shell" : "bash"
}
@typeoneerror
typeoneerror / sup
Created January 11, 2012 22:41
Sup (short for svn update) is a quick application for updating subversion checkouts in a local directory from anywhere in your shell and opening the resulting updated project folder in TextMate.
#!/bin/bash
###########
# sup #
###########
#defaults
BASEDIR=`dirname ${BASH_SOURCE}`
CONFIG="${BASEDIR}/.sup-config"
IGNORE_EXTERNALS=0
@typeoneerror
typeoneerror / blah.sqlite
Created January 19, 2012 19:12
making sqlite cli not suck
sqlite> .mod col
sqlite> .headers on
@typeoneerror
typeoneerror / ddhotkey.m
Created February 13, 2012 17:42
control+v
#pragma mark - Initial keyboard interactions
- (void)globalHotkeyWithEvent:(NSEvent *)event
{
NSLog(@"Firing -[%@ %@]", NSStringFromClass([self class]), NSStringFromSelector(_cmd));
NSLog(@"Hotkey event: %@", event);
}
- (void)registerGlobalKeyCommands
{
@typeoneerror
typeoneerror / gist:1886846
Created February 22, 2012 19:44
heroku states
2012-02-22T19:42:32+00:00 heroku[web.2]: State changed from up to bouncing
2012-02-22T19:42:32+00:00 heroku[web.2]: State changed from bouncing to created
2012-02-22T19:42:32+00:00 heroku[web.2]: State changed from created to starting
2012-02-22T19:42:32+00:00 heroku[web.1]: State changed from up to bouncing
2012-02-22T19:42:32+00:00 heroku[web.1]: State changed from bouncing to created
2012-02-22T19:42:32+00:00 heroku[web.1]: State changed from created to starting
2012-02-22T19:42:36+00:00 heroku[web.1]: Stopping process with SIGTERM
2012-02-22T19:42:36+00:00 app[web.1]: >> Stopping ...
{
"name": "Typeoneerror",
"description": "Website for typeoneerror.com",
"version": "0.0.1",
"private": true,
"dependencies": {
"express" : "2.5.8",
"jade" : ">= 0.0.1",
"backbone" : ">= 0.9.1",
"stylus" : ">= 0.24.0",
/**
* Actions for displaying the blog/articles.
*/
var Article = mongoose.model('Article')
, Tag = mongoose.model('Tag')
module.exports = function(app){