Skip to content

Instantly share code, notes, and snippets.

View bpoweski's full-sized avatar

Ben Poweski bpoweski

View GitHub Profile
@bpoweski
bpoweski / bgpd.conf
Created September 21, 2016 15:54 — forked from heri16/bgpd.conf
AWS VPC VPN StrongSwan Virtual Tunnel Interface (VTI)
#@ /etc/quagga/bgpd.conf (Centos & Ubuntu)
hostname <Local OS hostname>
password <Any random phrase>
enable password <Any random phrase>
!
log file /var/log/quagga/bgpd
!debug bgp events
!debug bgp zebra
debug bgp updates
@bpoweski
bpoweski / _service.md
Created March 19, 2016 17:10 — forked from fengye/_service.md
Sample /etc/init.d script

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
;;(require 'copterj.git-version) ;; Pick up DRY'd version numbers
(require 'clojure.contrib.io) ;; Needed to locate newrelic
(let [java-agent (str "-javaagent:" (clojure.contrib.io/pwd) "/lib/newrelic.jar")]
(defproject apij ~(copterj.git-version/git-describe)
:description "Hotelicopter's API"
:dependencies
[[com.hotelicopter/copterj "1.0.0-SNAPSHOT"]

Rounded rectangle with gradient background on the iPhone, NSTokenFieldCell style.

Screenshot

Unlike my previous implementation, this one is drawn inside a single view using Core Graphics. It can thus be used for optimized, fast-scrolling cells per Apple's TableViewSuite sample.

The gradient shades are changed from that implementation, too, and the border itself is gradiented (by drawing a smaller rectangle inside a larger one that becomes the border).

You need to include the uicolor-utilities category by Ars Technica.