#Postgres Cheat Sheet
###Destroy db
DROP DATABASE "DATEBASE_NAME";
###Create db
CREATE DATABASE "DATEBASE_NAME";
var destFolder = null; | |
destFolder = Folder.selectDialog( 'Select the folder where you want to save the exported files.', app.activeDocument.path ); | |
var baseDestName = app.activeDocument.name; | |
if (baseDestName.indexOf('.') < 0) | |
{ | |
//nothing | |
} else { |
/* The API controller | |
Exports 3 methods: | |
* post - Creates a new thread | |
* list - Returns a list of threads | |
* show - Displays a thread and its posts | |
*/ | |
var Thread = require('../models/thread.js'); | |
var Post = require('../models/post.js'); |
# Simple bijective function | |
# Basically encodes any integer into a base(n) string, | |
# where n is ALPHABET.length. | |
# Based on pseudocode from http://stackoverflow.com/questions/742013/how-to-code-a-url-shortener/742047#742047 | |
ALPHABET = | |
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789".split(//) | |
# make your own alphabet using: | |
# (('a'..'z').to_a + ('A'..'Z').to_a + (0..9).to_a).shuffle.join |
# http://rspec.info/ | |
# http://peepcode.com/products/rspec-user-stories | |
# http://dannorth.net/whats-in-a-story | |
# http://www.lukeredpath.co.uk/2006/8/29/developing-a-rails-model-using-bdd-and-rspec-part-1 | |
# http://www.benmabey.com/2008/05/19/imperative-vs-declarative-scenarios-in-user-stories/ | |
# http://www.benmabey.com/2008/02/04/rspec-plain-text-stories-webrat-chunky-bacon/ | |
# http://www.chariotsolutions.com/slides/pdfs/ete2008-IntegrationTestingWithRSpec.pdf | |
# http://www.joesniff.co.uk/ruby/telling-a-good-story-rspec-stories-from-the-trenches.html | |
# How does using stories help testing? |
/* | |
Distributed under The MIT License: | |
http://opensource.org/licenses/mit-license.php | |
Permission is hereby granted, free of charge, to any person obtaining | |
a copy of this software and associated documentation files (the | |
"Software"), to deal in the Software without restriction, including | |
without limitation the rights to use, copy, modify, merge, publish, | |
distribute, sublicense, and/or sell copies of the Software, and to |
#!/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 | |
# |
# source : http://code.google.com/p/natvpn/source/browse/trunk/stun_server_list | |
# A list of available STUN server. | |
stun.l.google.com:19302 | |
stun1.l.google.com:19302 | |
stun2.l.google.com:19302 | |
stun3.l.google.com:19302 | |
stun4.l.google.com:19302 | |
stun01.sipphone.com | |
stun.ekiga.net |
#import <UIKit/UIKit.h> | |
@interface DateFlowLayout : UICollectionViewFlowLayout | |
@end |
#Postgres Cheat Sheet
###Destroy db
DROP DATABASE "DATEBASE_NAME";
###Create db
CREATE DATABASE "DATEBASE_NAME";
@import UIKit; | |
#import "PersistentStack.h" | |
@interface AppDelegate : UIResponder <UIApplicationDelegate> | |
@property (strong, nonatomic) UIWindow *window; | |
@end |