In your command-line run the following commands:
brew doctor
brew update
start-at-login = true | |
accordion-padding = 0 | |
gaps.inner.horizontal = 10 | |
gaps.inner.vertical = 10 | |
after-startup-command = [ | |
'workspace 1', 'layout h_accordion horizontal', | |
'workspace 2', 'layout h_accordion horizontal', | |
] |
In your command-line run the following commands:
brew doctor
brew update
// 'Hello World' nodejs6.10 runtime AWS Lambda function | |
exports.handler = (event, context, callback) => { | |
console.log('Hello, logs!'); | |
callback(null, 'great success'); | |
} |
# Path to your oh-my-zsh installation. | |
export ZSH=/Users/dimitar.danailov/.oh-my-zsh | |
# Set name of the theme to load. | |
# Look in ~/.oh-my-zsh/themes/ | |
# Optionally, if you set this to "random", it'll load a random theme each | |
# time that oh-my-zsh is loaded. | |
# ZSH_THEME="robbyrussell" | |
ZSH_THEME="agnoster" |
Ansible playbook to setup HTTPS using Let's encrypt on nginx. | |
The Ansible playbook installs everything needed to serve static files from a nginx server over HTTPS. | |
The server pass A rating on [SSL Labs](https://www.ssllabs.com/). | |
To use: | |
1. Install [Ansible](https://www.ansible.com/) | |
2. Setup an Ubuntu 16.04 server accessible over ssh | |
3. Create `/etc/ansible/hosts` according to template below and change example.com to your domain | |
4. Copy the rest of the files to an empty directory (`playbook.yml` in the root of that folder and the rest in the `templates` subfolder) |
With autofs you can easily mount network volumes upon first access to the folder where you want to mount the volume. Autofs is available for many OS and is preinstalled on Mac OS X so I show you how I mounted my iTunes library folder using this method.
autofs needs to be configured so that it knows where to gets its configuration. Edit the file /etc/auto_master
and add the last line:
#
# Automounter master map
#
+auto_master # Use directory service
# Terminal Cheat Sheet | |
pwd # print working directory | |
ls # list files in directory | |
cd # change directory | |
~ # home directory | |
.. # up one directory | |
- # previous working directory | |
help # get help | |
-h # get help |
// This code accompanies a blog post: http://chris.eidhof.nl/posts/json-parsing-in-swift.html | |
// | |
// As of Beta5, the >>= operator is already defined, so I changed it to >>>= | |
import Foundation | |
let parsedJSON : [String:AnyObject] = [ | |
"stat": "ok", | |
"blogs": [ |
// Protocol for a type that supports a fromRaw(Int) conversion | |
// (such as "enum Foo: Int { ... }") | |
protocol ConvertibleFromRawInt { | |
class func fromRaw(raw: Int) -> Self? | |
} | |
// Note: Tried to use Swift's standard RawRepresentable protocol rather | |
// than ConvertibleFromRawInt, but couldn't get it to compile. | |
// Don't know whether it is a Swift bug or something I was doing wrong. |
From http://www.darkcoding.net/software/cleaning-up-old-git-branches/
Switch to the main branch, usually 'develop':
git checkout develop
Get a list of fully merged branches: