Skip to content

Instantly share code, notes, and snippets.

View ottok's full-sized avatar

Otto Kekäläinen ottok

View GitHub Profile
@petskratt
petskratt / clinup
Last active March 12, 2024 23:21
Use wp-cli to clean up WordPress installs (force core & plugins reinstall, track changes in git allowing easy reverts etc)
#!/usr/bin/env bash
# for debug output, uncomment:
#set -x
function help {
echo "WordPress cleanup -v 0.5 2018-06-26 / peeter@zone.ee
Usage:
@petskratt
petskratt / .gitignore
Last active March 30, 2024 15:02
Group file change times by inode ctime
.Idea
.DS_Store
@aras-p
aras-p / preprocessor_fun.h
Last active April 28, 2024 15:25
Things to commit just before leaving your job
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
@joaoneto
joaoneto / login.test.js
Created March 13, 2013 13:49
Login session test with mocha
var request = require('supertest'),
should = require('should'),
app = require('../server');
var Cookies;
describe('Functional Test <Sessions>:', function () {
it('should create user session for valid user', function (done) {
request(app)
.post('/v1/sessions')
@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active April 26, 2024 23:26 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.