Skip to content

Instantly share code, notes, and snippets.

{
"nouns": [
"Accordion",
"Bagpipes",
"Banjo",
"Bassoon",
"Cello",
"Clarinet",
"Cornet",
"Cymbal",
@krrg
krrg / docker-compose.yml
Last active August 13, 2018 21:53
Nginx Docker Compose
version: '3.3'
services:
web:
image: nginx:mainline
ports:
- 127.0.0.1:3000:3000
volumes:
- ./nginx.conf:/etc/nginx/nginx.conf:Z
command: [nginx-debug, '-g', 'daemon off;']
// Place your key bindings in this file to overwrite the defaults
[
{
"key": "home",
"command": "cursorHome",
"when": "editorTextFocus"
},
{
"key": "ctrl+a",
"command": "cursorHome",
@krrg
krrg / Dockerfile
Created February 24, 2017 23:46
WSGI Dockerfile / Elastic Beanstalk
FROM python:2.7
ADD . /app
WORKDIR /app
RUN pip install -r requirements.txt
CMD gunicorn --bind=0.0.0.0:13300 --max-requests=1200 --max-requests-jitter=300 --workers=8 --worker-class=gevent main:app
EXPOSE 13300

Keybase proof

I hereby claim:

  • I am krrg on github.
  • I am krr428 (https://keybase.io/krr428) on keybase.
  • I have a public key ASDXuqa99cpHndkLs6r55efQJm67e89utIaYUNmvcqZWCAo

To claim this, I am signing this object:

@krrg
krrg / staticserver.rb
Created October 8, 2016 05:45
A little static SPA server
require 'sinatra'
set :public_folder, File.dirname(__FILE__)
get '/favicon.ico' do
halt 404
end
get '/*' do
send_file 'index.html'
@krrg
krrg / whichport.sh
Created September 23, 2016 05:51
Which process is blocking this port?
sudo lsof -i -n -P | grep TCP | grep 3000
# From GitLab :)
// Place your key bindings in this file to overwrite the defaults
[
{
"key": "ctrl+a",
"command": "cursorHome",
"when": "editorTextFocus"
},
{
"key": "ctrl+e",
"command": "cursorEnd",
@krrg
krrg / keymap.cson
Last active September 9, 2016 01:37
My atom keymap
'atom-workspace atom-text-editor:not([mini])':
'ctrl-a':'editor:move-to-first-character-of-line'
'ctrl-e':'editor:move-to-end-of-line'
'ctrl-backspace':'core:delete'
'ctrl-shift-a':'core:select-all'
# This is a temporary server to serve the static directory correctly.
# SimpleHTTPServer couldn't do regex route matching, which meant that
# some routes weren't working correctly.
require 'sinatra'
set :public_folder, File.dirname(__FILE__)
get '/favicon.ico' do
halt 404