REGEX remove blank lines:
FROM: http://www.ultraedit.com/support/tutorials_power_tips/ultraedit/remove_blank_lines.html
FIND:
^(?:[\t ]*(?:\r?\n|\r))+
REGEX remove blank lines:
FROM: http://www.ultraedit.com/support/tutorials_power_tips/ultraedit/remove_blank_lines.html
FIND:
^(?:[\t ]*(?:\r?\n|\r))+
source 'SPLSpecs' # private Splinesoft specs | |
source 'master' | |
platform :ios, '8.0' | |
xcodeproj 'Mudrammer' | |
deployment_target = '7.0' | |
# Splinesoft |
Last week Dropbox introduced Dropbox Pro with 1TB storage space (and some other cool features) for $99/year (or $9,99/month), which is a pretty good deal (Google Drive 1TB also costs $99,99/year). The problem: it's not $99/year, but $130/year (or $13/month) if you happen to live in Europe. Instead of converting prices from dollars to euros, they just changed $ to €.
But that's not the best part. You can buy it cheaper if you use Dropbox app on iOS.
Now it's only $118/year or $10/month, which is much cheaper than through their website (and they still have to give 30% of that to apple!). I guess we should thank apple for not allowing different pricing in different regions. So if you plan to upgrade to Dropbox Pro, do it through their mobile app.
// Created by Ullrich Schäfer on 16/08/14. | |
// Bitmasks are a bit tricky in swift | |
// See http://natecook.com/blog/2014/07/swift-options-bitmask-generator/ | |
//enum LogFlag: Int32 { | |
// case Error = 0b1 | |
// case Warn = 0b10 | |
// case Info = 0b100 |
#!/usr/bin/env bash | |
# names of latest versions of each package | |
export NGINX_VERSION=1.15.5 | |
export VERSION_NGINX=nginx-$NGINX_VERSION | |
export VERSION_LIBRESSL=libressl-2.8.1 | |
export VERSION_PCRE=pcre-8.42 | |
#export NPS_VERSION=1.9.32.10 | |
#export VERSION_PAGESPEED=v${NPS_VERSION}-beta | |
#!/usr/bin/env bash | |
pattern=$1 | |
PORTS="" | |
if [ -z "$pattern" ]; then | |
PORTS=$(lsof -iTCP -sTCP:LISTEN) | |
else | |
PORTS=$(lsof -iTCP -sTCP:LISTEN | grep "$pattern") | |
fi |
/* | |
Batch-Rename Layers -- plugin for Sketch 2 (http://www.bohemiancoding.com/sketch/) | |
INSTALLATION | |
------------ | |
Select "Reveal Plugins Folder..." in the "Plugins" menu, | |
then put this file in the folder that shows up in the Finder. |
{ | |
"title": "SSH analysis", | |
"services": { | |
"query": { | |
"list": { | |
"0": { | |
"query": "message:\"Invalid user\" AND sshd", | |
"alias": "Failed login", | |
"color": "#BF1B00", | |
"id": 0, |
// Playground - noun: a place where people can play | |
import Cocoa | |
struct Regex { | |
let pattern: String | |
let expressionOptions: NSRegularExpressionOptions | |
let matchingOptions: NSMatchingOptions | |
init(pattern: String, expressionOptions: NSRegularExpressionOptions, matchingOptions: NSMatchingOptions) { |
nsinit
provides a handy way to access a shell inside a running container's namespace. This is useful for learning about how containers work, debugging your system without worrying about sshd daemons, and even hot fixes in production all you sad pandas!
:p
Running the docker daemon with the lxc driver allows you to use lxc-attach
to do this. But now that docker deafults to the new native libcontainer driver, nsinit
is probably the best way to go. jpetazzo's blog has a great high level summary.
The new issue is that the libcontainer .json format is under heavy development so you need to keep an nsinit
binary built from the exact release tag from the the docker github repo. The tricky part for me was understanding that golang is designed with certain assumptions about dependencies vs versioning with regards to when you push to master, push to a topic branch, and fork a project.