Skip to content

Instantly share code, notes, and snippets.

Paweł Sroka Srokap

Block or report user

Report or block Srokap

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
thecaddy / childModel.js
Last active Jul 2, 2019
A sequelize plugin to support postgres inherited tables with models
View childModel.js
import inheritFrom form './inheritFrom'
import inherittedModel from './inherittedModel'
export default function(sequelize, DataTypes) {
const ChildModel = inheritFrom(sequelize, DataTypes)('childModel', inherittedModel, {
// define child model specific properties here
id: Sequelize.INTEGER,
some_model_id: Sequelize.INTEGER
codeb2cc / gist:6280031
Created Aug 20, 2013
Nginx log format and GoAccess configuration.
View gist:6280031
# Nginx log format
log_format main '$remote_addr\t$remote_user\t$time_local\t$request_time\t$request\t'
# GoAccess configuration
# IMPORTANT: Replace all `\t` below with real tabs
date_format %d/%b/%Y:%T
log_format %h\t%^\t%d %^\t%T\t%r\t%s\t%b\t%R\t%u\t%^
piscisaureus /
Created Aug 13, 2012
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url =

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

You can’t perform that action at this time.