Skip to content

Instantly share code, notes, and snippets.

@chrisroos
chrisroos / hsbc-friendly-account-names.user.js
Created February 7, 2014 13:00
A simple Greasemonkey style user script to replace account numbers with friendly names in the HSBC business banking user interface
// ==UserScript==
// @name HSBC - Friendly account names
// @namespace http://chrisroos.co.uk/
// @description Replace account numbers with friendly names to help differentiate accounts in HSBC UK Business banking
// @include https://www.business.hsbc.co.uk/*
// ==/UserScript==
(function() {
var accounts = {
'12345678': 'Current account',
@arvidkahl
arvidkahl / recunrar.sh
Created February 21, 2012 13:50
recursive unrar script (with rm) that keeps directory structure intact
#!/bin/bash
for f in `find . -type f -name "*.rar"`
do
echo "Unpacking " $f " into " `dirname $f`
unrar x -y $f `dirname $f`
rm $f
done
@stevenhaddox
stevenhaddox / ds215j_provisioner.md
Last active June 16, 2018 08:35
Bootstrap Synology DS215j DSM 5.x provisioner steps

Boostrap the Synology DS215j with optware, ipkg, and sudo

Inspired mostly from the Bootstrap DS215j blog post

Download & Install ipkg in a persistent manner

# Create a directory that won't get nuked during DSM security updates
mkdir /volume1/@optware
cd /volume1/@optware
@f-f
f-f / spacemacs-cheshe.md
Last active July 31, 2019 16:09 — forked from robphoenix/spacemacs-cheshe.md
Spacemacs Cheat Sheet

Useful Spacemacs commands

  • SPC q q - quit
  • SPC w / - split window vertically
  • SPC w - - split window horizontally
  • SPC 1 - switch to window 1
  • SPC 2 - switch to window 2
  • SPC w c - delete current window
  • SPC TAB - switch to previous buffer
  • SPC b b - switch buffers
@ryanray
ryanray / deploy.rb
Created November 21, 2013 11:15
I couldn't find a quick example of how to deploy a node.js app using Capistrano 3. This gist assumes you are using Capistrano 3, Upstart, Forever, ssh/forward agent, and an unprivileged user named 'deploy'. Hopefully this simple setup will help to get you started.
# config/deploy.rb
# probably a lot of ways to improve this...
set :application, 'my_app'
set :repo_url, 'git@github.com:USERNAME/my_app.git'
# should set up a deploy user
set :user, 'deploy'
set :deploy_to, '/var/www/my_app'
set :scm, :git
@vgoma
vgoma / webpack-dev-server-watch-docker-container-osx.md
Last active March 28, 2021 11:27
Configuring webpack dev server watch inside docker container on OSX 10.12.5 (Sierra)

Configuring webpack dev server watch inside docker container on OSX 10.12.5 (Sierra)

The problem

When running webpack dev server from inside of docker container dev server says that it watching files, but don't react on changes in hosts filesystem. It also can actually react and recompile bundle but stream not updated files to the browser.

Solution

Some of this steps might not needed, but it was long run googling for complete solution

If you're using Webstorm or Phpstorm etc. Try disable "safe write" option in settings:

@tach
tach / Synology_NAS_Tips.md
Last active May 10, 2021 21:06
My tips using Synology NAS (DS215j)

Synology NAS Tips

Shell operation tips

Password of root is same as administrator account as you created on setup.

How to change shell prompt

PS1="\u@\h:\w$ "
@zer4tul
zer4tul / weechat.md
Last active August 21, 2021 21:12
A Simple, Base16 Friendly, Weechat Setup

A Simple, Base16 Friendly, Weechat Setup

Scripts

  • Some must-have scripts
  /script install buffers.pl buffer_autoclose.py iset.pl go.py colorize_nicks.py
@joelmoss
joelmoss / gist:2470666
Created April 23, 2012 12:37
Capistrano recipe for Puma start/stop/restarts
set :shared_children, shared_children << 'tmp/sockets'
namespace :deploy do
desc "Start the application"
task :start, :roles => :app, :except => { :no_release => true } do
run "cd #{current_path} && RAILS_ENV=#{stage} bundle exec puma -b 'unix://#{shared_path}/sockets/puma.sock' -S #{shared_path}/sockets/puma.state --control 'unix://#{shared_path}/sockets/pumactl.sock' >> #{shared_path}/log/puma-#{stage}.log 2>&1 &", :pty => false
end
desc "Stop the application"
task :stop, :roles => :app, :except => { :no_release => true } do
#!/bin/bash
# get-docker-socket-from-remote <name> <user>@<host>
# Create a unix socket at /tmp/<name>-docker.sock which, when
# used will ssh to <user>@<host> and connect to the docker
# socket at <host>:///var/run/docker.sock
# Note:
# 1. This forks a subjob that manages the local socket.
# Rmember to kill that when your finished