Skip to content

Instantly share code, notes, and snippets.

@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$ "
@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
@janko
janko / 01-activerecord.rb
Created May 27, 2015 22:50
PostgreSQL JSON querying in Sequel (my presentation from our local Ruby meetup)
require "active_record"
ActiveRecord::Base.establish_connection('postgres:///testing')
ActiveRecord::Migration.verbose = false
ActiveRecord::Migration.class_eval do
create_table :played_quizzes, force: true do |t|
t.integer :player_ids, array: true
t.json :quiz_snapshot
end
@tuxfight3r
tuxfight3r / tcp_flags.txt
Last active April 17, 2024 14:48
tcpdump - reading tcp flags
##TCP FLAGS##
Unskilled Attackers Pester Real Security Folks
==============================================
TCPDUMP FLAGS
Unskilled = URG = (Not Displayed in Flag Field, Displayed elsewhere)
Attackers = ACK = (Not Displayed in Flag Field, Displayed elsewhere)
Pester = PSH = [P] (Push Data)
Real = RST = [R] (Reset Connection)
Security = SYN = [S] (Start Connection)
@JunichiIto
JunichiIto / alias_matchers.md
Last active April 16, 2024 16:18
List of alias matchers in RSpec 3

This list is based on aliases_spec.rb.

You can see also Module: RSpec::Matchers API.

matcher aliased to description
a_truthy_value be_truthy a truthy value
a_falsey_value be_falsey a falsey value
be_falsy be_falsey be falsy
a_falsy_value be_falsey a falsy value
#!/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
@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
@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',
@XVilka
XVilka / TrueColour.md
Last active April 8, 2024 14:02
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

@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