Verify Permissions
diskutil verifyPermissions /
Repair Permissions
diskutil repairPermissions /
<?php | |
/** | |
* @author Alexis Gruet | |
* | |
* A simple implementation of the Weighted Round-Robin Scheduling in PHP 5.3+ | |
* | |
* The weighted round-robin scheduling is designed to better handle servers with different | |
* processing capacities. Each server can be assigned a weight, an integer value that | |
* indicates the processing capacity. Servers with higher weights receive new connections |
#!/bin/bash | |
# A script to set up a new mac. Uses bash, homebrew, etc. | |
# Focused for ruby/rails development. Includes many utilities and apps: | |
# - homebrew, rvm, node | |
# - quicklook plugins, terminal fonts | |
# - browsers: chrome, firefox | |
# - dev: iterm2, sublime text, postgres, chrome devtools, etc. | |
# - team: slack, dropbox, google drive, skype, etc |
<?xml version="1.0" encoding="UTF-8"?> | |
<Document xmlns="urn:AcceptorAuthorisationRequestV02.1"> | |
<AccptrAuthstnReq> | |
<Hdr> | |
<MsgFctn>AUTQ</MsgFctn> | |
<PrtcolVrsn>2.0</PrtcolVrsn> | |
</Hdr> | |
<AuthstnReq> | |
<Envt> | |
<Acqrr> |
import json | |
import geojson | |
from shapely.geometry import shape | |
o = { | |
"coordinates": [[[23.314208, 37.768469], [24.039306, 37.768469], [24.039306, 38.214372], [23.314208, 38.214372], [23.314208, 37.768469]]], | |
"type": "Polygon" | |
} | |
s = json.dumps(o) |
### INSTALLATION NOTES ### | |
# 1. Install Homebrew (https://github.com/mxcl/homebrew) | |
# 2. brew install zsh | |
# 3. Install OhMyZsh (https://github.com/robbyrussell/oh-my-zsh) | |
# 4. brew install reattach-to-user-namespace --wrap-pbcopy-pbpaste && brew link reattach-to-user-namespace | |
# 5. Install iTerm2 | |
# 6. In iTerm2 preferences for your profile set: | |
# Character Encoding: Unicode (UTF-8) | |
# Report Terminal Type: xterm-256color | |
# 7. Put itunesartist and itunestrack into PATH |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title></title> | |
<link href="style.css" rel="stylesheet" /> | |
</head> | |
<body> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script> |
Every so often I have to restore my gpg keys and I'm never sure how best to do it. So, I've spent some time playing around with the various ways to export/import (backup/restore) keys.
cp ~/.gnupg/pubring.gpg /path/to/backups/
cp ~/.gnupg/secring.gpg /path/to/backups/
cp ~/.gnupg/trustdb.gpg /path/to/backups/
# Function returns user.login, current year, the primary_key which is the id, in 5 length (Example: 00045) | |
string format | |
# http://developer.postgresql.org/pgdocs/postgres/functions-formatting.html | |
# to_char(5,'00000') results the same number format | |
CREATE OR REPLACE FUNCTION "public"."function_name" () RETURNS trigger AS | |
' | |
BEGIN | |
NEW.title = (SELECT login FROM users WHERE id = NEW.author) || to_char(NOW(),\'YYYY\') || lpad(NEW.id::char, 5, \'0\'); | |
RETURN NEW; | |
END |