Skip to content

Instantly share code, notes, and snippets.

View chrisloftus's full-sized avatar

Chris Loftus chrisloftus

View GitHub Profile
zip <name>.zip -r * .[^.]* -x '*.git*' -x '*.DS_Store' -x bootstrap/cache -x storage/framework/cache -x storage/framework/views -x storage/logs -x vendor -x tests -x .env
@chrisloftus
chrisloftus / nginx vhost
Last active November 12, 2016 22:20
Nginx + php7.0-fpm lag per request under load
$ ab -n 5000 -c 333 http://redacted
This is ApacheBench, Version 2.3 <$Revision: 1528965 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking 188.166.145.38 (be patient)
Completed 500 requests
Completed 1000 requests
Completed 1500 requests
Completed 2000 requests
@chrisloftus
chrisloftus / Default (OSX).sublime-keymap
Created March 21, 2016 21:01
Sublime Text User Key Bindings
[
{ "keys": ["ctrl+s"], "command": "sort_lines", "args": {"case_sensitive": false} },
{ "keys": ["ctrl+shift+s"], "command": "sort_lines", "args": {"case_sensitive": true} },
{ "keys": ["ctrl+d"], "command": "run_macro_file", "args": {"file": "res://Packages/Default/Delete Line.sublime-macro"} },
]
@chrisloftus
chrisloftus / Preferences.sublime-settings
Last active June 19, 2017 17:10
Sublime Text User Preferences
{
"bold_folder_labels": false,
"binary_file_patterns": ["node_modules/"],
"caret_style": "phase",
"color_scheme": "Packages/User/SublimeLinter/itg.dark (SL).tmTheme",
"dictionary": "Packages/Language - English/en_GB.dic",
"font_face": "SourceCodePro-Regular",
"font_size": 15,
"highlight_line": true,
"ignored_packages":
@chrisloftus
chrisloftus / vim.markdown
Last active June 28, 2016 15:56
Vim cheatsheet

Vim Commands

  • set number show line numbers

  • :m 12 move current line to line 12

  • :5,8m 2 move lines 5-8 to after line 2

  • :!{command} execute unix command from vim

var gulp = require('gulp'),
sass = require('gulp-ruby-sass'),
autoprefix = require('gulp-autoprefixer'),
notify = require('gulp-notify'),
browserSync = require('browser-sync'),
reload = browserSync.reload
;
var config = {
sassPath: './resources/sass'