Skip to content

Instantly share code, notes, and snippets.

Chris Loftus chrisloftus

  • Manchester, UK
Block or report user

Report or block chrisloftus

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@chrisloftus
chrisloftus / nginx vhost
Last active Nov 12, 2016
Nginx + php7.0-fpm lag per request under load
View nginx vhost
$ 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 Mar 21, 2016
Sublime Text User Key Bindings
View Default (OSX).sublime-keymap
[
{ "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 Jun 19, 2017
Sublime Text User Preferences
View Preferences.sublime-settings
{
"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 Jun 28, 2016
Vim cheatsheet
View vim.markdown

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

View gulpfile.js
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'
You can’t perform that action at this time.