Skip to content

Instantly share code, notes, and snippets.

View rhyslbw's full-sized avatar

Rhys Bartels-Waller rhyslbw

  • Input Output Global
  • UK
  • 12:19 (UTC +01:00)
View GitHub Profile

Raise Open File Limits in OS X

in OS X 10.4 to macOS sierra 10.12 and maybe higher!

Create Launcher Script:

/Library/LaunchDaemons/limit.maxfiles.plist

Copy this entire code block and paste it into your terminal and push Return to create this file for you with correct permissions. It will (probably) ask for your password:

@troyhunt
troyhunt / Build-Troys-Network
Last active February 21, 2024 02:52
Help me spec out a replacement home network using Ubiquiti bits
That's it - I've finally lost it with Linksys and both my WRT 1900ACs that are only a year old are getting chucked. Don't get me started on all the reasons why, but it's primarily down to continued degradation of wifi signal and the constant need for reboots. Going by the responses to this tweet, that's just what they do: https://twitter.com/troyhunt/status/778867707655487488
I’m going all out with Ubiquiti instead. No, I'm not interested in [insert the other thing you think rocks here], there's a really vocal majority in favour of Ubiquiti so that's that. Now I need help speccing out what I need for my house as it’s not quite as straight forward as just chucking in a couple of (dodgy) routers.
Here’s what I’m working with:
- Large multi-level house about 500m2 (needs at least 2 APs, probably more)
- Wired ethernet to every room (I believe Cat 5e, was here when I got here)
- Patch board in the garage and a 100Mbps hub (running patch cables out to a Linksys 8 port gigabit switch instead)
- 4 wired connection
@danieleggert
danieleggert / GPG and git on macOS.md
Last active June 6, 2024 09:29
How to set up git to use the GPG Suite

GPG and git on macOS

Setup

No need for homebrew or anything like that. Works with https://www.git-tower.com and the command line.

  1. Install https://gpgtools.org -- I'd suggest to do a customized install and deselect GPGMail.
  2. Create or import a key -- see below for https://keybase.io
  3. Run gpg --list-secret-keys and look for sec, use the key ID for the next step
  4. Configure git to use GPG -- replace the key with the one from gpg --list-secret-keys
@jsanders
jsanders / gulpfile.babel.js
Created October 27, 2015 02:15
Gulp + ES 2015 / Babel + PostCSS + Lost + BrowserSync
import gulp from 'gulp';
import postcss from 'gulp-postcss';
import sourcemaps from 'gulp-sourcemaps';
import cssnano from 'cssnano';
import autoprefixer from 'autoprefixer';
import lost from 'lost';
import {create as bsCreate} from 'browser-sync';
const browserSync = bsCreate();
const dirs = {
# on the server: server.coffee
Metrics = (name, aggregationQuery, collection, interval) ->
@name = name
@aggregationQuery = aggregationQuery
@collection = collection
@interval = interval or 1000*10
@_collectionName = 'metrics-transport'
Metrics.prototype._getCollectionName = -> "metrics-#{@name}"
@jareiko
jareiko / codeship-meteor-script.md
Last active March 6, 2016 00:03
Deploying to Meteor with Codeship.io

Deploying to Meteor with Codeship.io

Project structure

You'll need to use a subdirectory within your git repo for the Meteor project. This allows you to clone Meteor into your repo without it trying to deploy itself. If you find a better way, please let me know.

Provide the name of the subdirectory to the deploy script with the SUBDIRECTORY environment variable.

@sogko
sogko / app.js
Last active November 8, 2022 12:31
gulp + expressjs + nodemon + browser-sync
'use strict';
// simple express server
var express = require('express');
var app = express();
var router = express.Router();
app.use(express.static('public'));
app.get('/', function(req, res) {
res.sendfile('./public/index.html');
@samwize
samwize / mocha-guide-to-testing.js
Created February 8, 2014 05:53
Explain Mocha's testing framework - describe(), it() and before()/etc hooks
// # Mocha Guide to Testing
// Objective is to explain describe(), it(), and before()/etc hooks
// 1. `describe()` is merely for grouping, which you can nest as deep
// 2. `it()` is a test case
// 3. `before()`, `beforeEach()`, `after()`, `afterEach()` are hooks to run
// before/after first/each it() or describe().
//
// Which means, `before()` is run before first it()/describe()