most of these require logout/restart to take effect
# Enable character repeat on keydown
defaults write -g ApplePressAndHoldEnabled -bool false
# Set a shorter Delay until key repeat| module.exports = function(app) { | |
| var User = app.models.User; | |
| // TODO: (1) find an example of how to add new "properties" to the built-in User mode via boot script | |
| // (2) This is how you can add a "relationship" to the built-in User model via boot script | |
| var SomeOtherModel = app.models.SomeOtherModel; | |
| User.hasMany(SomeOtherModel, {as: 'someOtherModels', foreignKey: 'someOtherModelId'}); | |
| // (3) This is how you can add "remote methods" to the built-in User model via boot script |
| /*! Prefix flex for IE10 and Safari / iOS in LESS | |
| * https://gist.github.com/codler/2148ba4ff096a19f08ea | |
| * Copyright (c) 2014 Han Lin Yap http://yap.nu; MIT license */ | |
| .display(@value) when (@value = flex) { | |
| display: -ms-flexbox; // IE10 | |
| display: -webkit-flex; // Safari / iOS | |
| } | |
| .display(@value) when (@value = inline-flex) { |
| #!/usr/bin/env bash | |
| # Sysbench wrapper for several tests of sysbench | |
| # Scales with number of processors, works on mac and linux | |
| # | |
| # @link https://gist.github.com/lavoiesl/7536567 | |
| # | |
| # wget https://gist.github.com/lavoiesl/7536567/raw/sysbench.sh -O - 2>/dev/null | bash | |
| # | |
| # Requires http://sysbench.sourceforge.net/ |
| #!/bin/bash | |
| # Mac OS launchctl utility | |
| # Support partial match | |
| # Will exit on error if no of more than one service is found. | |
| # | |
| # @link http://blog.lavoie.sl/2013/08/service-management-utility-for-mac-osx.html | |
| # @link https://gist.github.com/lavoiesl/6160897 | |
| # | |
| # Usage: | |
| # service selfupdate |
| #!/bin/bash | |
| # | |
| # Tracebacks in bash | |
| # https://docwhat.org/tracebacks-in-bash/ | |
| # | |
| # Just take the code between the "cut here" lines | |
| # and put it in your own program. | |
| # | |
| # Written by Christian Höltje | |
| # Donated to the public domain in 2013 |
| <?php | |
| /** | |
| * On each PHP request (cli, cgi or apache module), | |
| * this script will detect to which project the file belongs and log it. | |
| * It also features a threshold so a couple consecutive minutes without a request | |
| * doesn't stop your timer, see below. | |
| * | |
| * To install, configure the roots (see below) add this line to your php.ini: | |
| * auto_prepend_file=/path/to/file/time-spender-logger.php | |
| * |
| Copyright (C) 2012 Yoshimasa Niwa | |
| Permission is hereby granted, free of charge, to any person obtaining | |
| a copy of this software and associated documentation files (the | |
| "Software"), to deal in the Software without restriction, including | |
| without limitation the rights to use, copy, modify, merge, publish, | |
| distribute, sublicense, and/or sell copies of the Software, and to | |
| permit persons to whom the Software is furnished to do so, subject to | |
| the following conditions: |
| # http://blog.lavoie.sl/2012/10/git-tutorial-and-global-configs.html | |
| [user] | |
| name = Sébastien Lavoie | |
| email = [email protected] | |
| [color] | |
| diff = auto | |
| status = auto | |
| branch = auto |
| <?php | |
| // file: ./Shape/Circle.php | |
| namespace Shape; | |
| class Circle extends Shape implements ShapeInterface { | |
| public function __construct() { | |
| var_dump($this); | |
| } |