Skip to content

Instantly share code, notes, and snippets.

View Nimdis's full-sized avatar

Sergei Toroshchin Nimdis

View GitHub Profile
@johanndt
johanndt / upgrade-postgres-9.3-to-9.5.md
Last active July 27, 2024 16:49 — forked from dideler/upgrade-postgres-9.3-to-9.4.md
Upgrading PostgreSQL from 9.3 to 9.5 on Ubuntu

TL;DR

Install Postgres 9.5, and then:

sudo pg_dropcluster 9.5 main --stop
sudo pg_upgradecluster 9.3 main
sudo pg_dropcluster 9.3 main
@mabasic
mabasic / helpers.php
Last active February 3, 2025 19:47
config_path function for Lumen framework
<?php
if ( ! function_exists('config_path'))
{
/**
* Get the configuration path.
*
* @param string $path
* @return string
*/
@VladSem
VladSem / tmux_ubuntu14.04.sh
Last active July 7, 2020 21:12
install tmux 2.0 on Ubuntu 14.04
sudo apt-get update
sudo apt-get install -y python-software-properties software-properties-common
sudo add-apt-repository -y ppa:pi-rho/dev
sudo apt-get update
sudo apt-get install -y tmux=2.0-1~ppa1~t
@tonycoco
tonycoco / controller_spec.rb
Last active May 25, 2023 06:04
The Greatest Hits of Rspec Testing: Volume 1
require "spec_helper"
describe ExampleController do
context "GET #index" do
let(:resources) { FactoryGirl.create_list(:resource) }
before do
get :index
end
@nemtsov
nemtsov / connect-use-many.js
Created August 4, 2013 01:44
Connect middleware used when you need to combine multiple other middleware into one.
/**
* @param {Array} list of middleware to combine
*/
module.exports = function (list) {
return function (req, res, next) {
(function iter(i) {
var mid = list[i]
if (!mid) return next()
mid(req, res, function (err) {
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active August 29, 2025 11:19
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@tsabat
tsabat / zsh.md
Last active August 27, 2025 16:01
Getting oh-my-zsh to work in Ubuntu