Skip to content

Instantly share code, notes, and snippets.

View fesplugas's full-sized avatar
🐿️

Francesc Esplugas fesplugas

🐿️
View GitHub Profile
@fxn
fxn / gist:5404357
Created April 17, 2013 13:37
Custom Keymap for RubyMine (by fxn)
# Custom Keymap for RubyMine (by fxn)
The keymap I work with, inspired by my past Emacs years, these are configurable
in Preferences -> Keymap.
Most of these have no conflict with the existing shortcuts, I use the default
keymap for Mac OS X and add these ones (an action can have several shortcuts).
To configure two strokes enter the first one in the main textfield (eg, C-g),
check "Second Stroke" and the second one there (eg, c).
@rtfpessoa
rtfpessoa / docker-toolbox-init.sh
Last active April 28, 2016 11:55
Docker Toolbox init script for OS X
#!/bin/bash
#
# Docker toolbox init OS X
#
FORCE=${1-true}
USERS="/Users"
VAR="/var/folders"
@foliosus
foliosus / delayed_job.conf
Created October 6, 2011 08:28
Upstart script to run delayed_job, with a weird rvm hack
# /etc/init/delayed_job.conf
# Note that you have to modify script/delayed_job's shebang line to have the correct ruby path
description "Delayed_job for a Rails app"
author "Brent Miller <foliosus@foliosus.com>"
start on started mysql
stop on stopping mysql
@dshaw
dshaw / application.js
Created June 8, 2011 17:43 — forked from fabware/application.js
socket.io application and haproxy configuration
var express = require('express');
var redis = require('redis');
const serverType = process.argv[2];
const serverHost = process.argv[3];
const serverPort = parseInt(process.argv[4]);
const redisPort = 6379;
const redisHost = '127.0.0.1';
streams
.store("my_entity_store", QueryableStoreTypes.keyValueStore());
.get(entityId);
@siawyoung
siawyoung / post_to_slack.rb
Created March 16, 2015 04:39
Script for posting to Slack's incoming webhooks
require 'json'
require 'optparse'
require 'net/http'
require 'net/https'
def parse_options(argv)
#######################################
# Please change the following as needed
#######################################
@toolmantim
toolmantim / docker-compose.yml
Created April 1, 2015 07:27
Example docker-compose.yml for a Rails application
app:
build: .
links:
- db:db
- redis:redis
- memcache:memcache
volumes:
- ./:/app
environment:
PGHOST: db
@ideasasylum
ideasasylum / translate_amazon.js
Last active July 30, 2020 23:18
Translate Amazon service names into plain English (see https://www.expeditedssl.com/aws-in-plain-english)
// ==UserScript==
// @name Translate Amazon
// @namespace http://your.homepage/
// @version 0.1
// @description Translate the Amazon service names into plain English. See https://www.expeditedssl.com/aws-in-plain-english
// @author @ideasasylum
// @match https://*.console.aws.amazon.com/console/home?*
// @grant none
// ==/UserScript==
@afcapel
afcapel / journal.rb
Last active February 2, 2021 06:55
Script at ~/bin/journal I use to keep a journaling practice
#!/usr/bin/env ruby --disable-gems
require "date"
require "fileutils"
JOURNAL_DIR = File.expand_path("~/Google Drive/writing/journal")
now = DateTime.now
date = now.strftime("%F")
@wm
wm / pair.md
Last active April 1, 2021 23:37
TMUX Pairing

SSH setup for remote pairing

If Animal and Fozzie wanted to pair on Animals machine and they both have access to shared.muppets.com then they could use the following setup

  • Animal will have the following in ~/.ssh/config
Host tunnel_from_muppets
  Hostname shared.muppets.com
 RemoteForward 1235 localhost:22