Skip to content

Instantly share code, notes, and snippets.

View normancarcamo's full-sized avatar
😎
Seizing time.

ncardez normancarcamo

😎
Seizing time.
View GitHub Profile
@szxp
szxp / release.sh
Last active April 11, 2023 07:06
Automatically bump Git tag versions and create a new tag
#!/bin/sh
# BSD 3-Clause License
#
# Copyright (c) 2017, Péter Szakszon
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
@Ashton-W
Ashton-W / Issue.md
Last active May 21, 2024 06:46
GitHub Markdown toggle code block
Click to toggle contents of `code`
CODE!
@bulkan
bulkan / user.js
Created January 7, 2015 22:39
Mocking Sequelize model function
var Promise = require('bluebird');
var sinon = require('sinon');
var User = require('./db/models').User;
describe('User model', function(){
var userFindStub;
var sandbox;
before(function(){
sandbox = sinon.sandbox.create();
@djheru
djheru / audit_table.sql
Created October 7, 2014 12:38
Example audit table and trigger function for Postgresql
CREATE TABLE audit_log (
username text, -- who did the change
event_time_utc timestamp, -- when the event was recorded
table_name text, -- contains schema-qualified table name
operation text, -- INSERT, UPDATE, DELETE or TRUNCATE
before_value json, -- the OLD tuple value
after_value json -- the NEW tuple value
);
CREATE OR REPLACE FUNCTION audit_trigger()