mkdir -p /usr/local/etc/nginx/sites-available
File locations:
nginx.confto/usr/local/etc/nginx/defaultanddefault-sslto/usr/local/etc/nginx/sites-available
#STOP APACHE
sudo apachectl stop
| import Cocoa | |
| // Support Foundation calls on String | |
| public extension String { public var ns: NSString {return self as NSString} } | |
| /// Custom Labeled Playground-Based Drag-and-Drop window | |
| public class DropView: NSTextField { | |
| // Default action handler | |
| public var handler: ([String]) -> Void = { paths in Swift.print(paths) } |
| // allows YYYY/M/D and periods instead of slashes | |
| // http://stackoverflow.com/questions/24989065/trying-to-validate-yyyy-mm-dd | |
| /^\d{4}[\/.]\d{1,2}[\/.]\d{1,2}$/ | |
| // YYYY-MM-DD and YYYY-M-D | |
| // http://stackoverflow.com/questions/6177975/how-to-validate-date-with-format-mm-dd-yyyy-in-javascript | |
| /^\d{4}\-\d{1,2}\-\d{1,2}$/ | |
| // YYYY-MM-DD | |
| // https://gist.github.com/arth2o/8471150 |
| DROP TABLE currency; | |
| -- Create table variable | |
| CREATE TABLE currency ( | |
| name VARCHAR(20), | |
| code VARCHAR(3), | |
| symbol VARCHAR(5) | |
| ); | |
| ALTER TABLE currency CONVERT TO CHARACTER SET utf8; |
| function logClass(target: any) { | |
| // save a reference to the original constructor | |
| var original = target; | |
| // a utility function to generate instances of a class | |
| function construct(constructor, args) { | |
| var c : any = function () { | |
| return constructor.apply(this, args); | |
| } |
mkdir -p /usr/local/etc/nginx/sites-available
File locations:
nginx.conf to /usr/local/etc/nginx/default and default-ssl to /usr/local/etc/nginx/sites-available #STOP APACHE
sudo apachectl stop
| #!/usr/bin/env bash | |
| # fresh-chrome | |
| # | |
| # Use this script on OS X to launch a new instance of Google Chrome | |
| # with its own empty cache, cookies, and user configuration. | |
| # | |
| # The first time you run this script, it will launch a new Google | |
| # Chrome instance with a permanent user-data directory, which you can | |
| # customize below. Perform any initial setup you want to keep on every |
| ssh-keygen -t rsa -b 4096 -m PEM -f jwtRS256.key | |
| # Don't add passphrase | |
| openssl rsa -in jwtRS256.key -pubout -outform PEM -out jwtRS256.key.pub | |
| cat jwtRS256.key | |
| cat jwtRS256.key.pub |
| defmodule MyBlog.Repo.Migrations.CreatePost do | |
| use Ecto.Migration | |
| def change do | |
| create table(:posts, primary_key: false) do | |
| add :id, :uuid, primary_key: true | |
| add :body, :string | |
| add :word_count, :integer | |
| timestamps |
| // Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/ | |
| // See also: http://www.paulund.co.uk/change-url-of-git-repository | |
| $ cd $HOME/Code/repo-directory | |
| $ git remote rename origin bitbucket | |
| $ git remote add origin https://github.com/mandiwise/awesome-new-repo.git | |
| $ git push origin master | |
| $ git remote rm bitbucket |