This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using bfs = boost::filesystem; | |
void recursive_copy(const bfs::path &src, const bfs::path &dst) | |
{ | |
if (bfs::exists(dst)){ | |
throw std::runtime_error(dst.generic_string() + " exists"); | |
} | |
if (bfs::is_directory(src)) { | |
bfs::create_directories(dst); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# APPEND THIS TO THE END OF .fvwm2rc | |
# This is similar bindings to my i3 setup. the only main difference is | |
# that alt-(D|W|E) are all missing | |
# modifier: N-(none), C-(control), S-(shift), M-(Alt), | |
# L-(caps-lock), A-(Any) | |
# Key [keyname] [context] [modifiers] function | |
# move between open windows with tab, shift+tab | |
Module FvwmAuto 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(f => f(f)) | |
(fn => nxt => n => n === 1 ? [] : [nxt(n)].concat(fn(fn)(nxt)(n/nxt(n)))) | |
((f => f(f)) | |
(nxt => d => n => d >= n ? d : n%d === 0 ? d : nxt(nxt)(d+1)(n)) | |
(2)) | |
(1024) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
... | |
global.uncachedRequire = function(path){ | |
delete require.cache[require.resolve(path)]; | |
return require(path); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
//INTERFACE CODE | |
module.exports = (function(){ | |
var fs = require('fs'), | |
path = require('path'), | |
Promise = require('bluebird'), | |
Transaction = require('sequelize/lib/transaction'), | |
Sequelize = require("sequelize"), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
//MIXIN MODULE | |
/** | |
revisionsLib mixin. | |
This mixin creates a revisions table for the model that it is mixed into. Each revision has the exact | |
same fields as the original item + revisionId, revisionValidFrom and revisionValidTo. revisionValidTo | |
is null for any current items that have not been deleted from the original table yet. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
//MIXIN MODULE | |
module.exports = function(sequelize, config){ | |
var Sequelize = require('sequelize'), | |
shortid = require('shortid'); | |
return { | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
//MIXIN MODULE | |
module.exports = function(sequelize, config){ | |
var _ = require('lodash'), | |
Sequelize = require('sequelize'), | |
Promise = require('bluebird'), | |
idLib = require(config.fsConfig.fsDbIdLib)(sequelize, config), | |
modelSuffix = '_closure'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file has been auto-generated by i3-config-wizard(1). | |
# It will not be overwritten, so edit it as you like. | |
# | |
# Should you change your keyboard layout somewhen, delete | |
# this file and re-run i3-config-wizard(1). | |
# | |
# i3 config file (v4) | |
# | |
# Please see http://i3wm.org/docs/userguide.html for a complete reference! |