I hereby claim:
- I am frak on github.
- I am frak (https://keybase.io/frak) on keybase.
- I have a public key ASBZKTAz8fEvT9vmDNv1tUDCm-2ndGfcVk0SKGTjmSFsdwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/env php | |
<?php | |
if ($argc !== 2) { | |
die('Usage: cleanup_header_comments.php directory_to_fix'.PHP_EOL); | |
} | |
$workingDir = $argv[1]; | |
if (is_dir($workingDir) === false || is_writable($workingDir) === false) { | |
die($workingDir.' either does not exist or is not writable'); |
<?php | |
class Called | |
{ | |
public function doThis($callback) | |
{ | |
$callback('this is not a love song'); | |
} | |
} |
#!/bin/bash | |
# Put this file at: .git/hooks/post-checkout | |
# and make it executable | |
# You can install it system wide too, see http://stackoverflow.com/a/2293578/685587 | |
PREV_COMMIT=$1 | |
POST_COMMIT=$2 | |
NOCOLOR='\033[0m' |
When you're working on multiple coding projects, you might want a couple different version of Python and/or modules installed. That way you can keep each project in its own sandbox instead of trying to juggle multiple projects (each with different dependencies) on your system's version of Python. This intermediate guide covers one way to handle multiple Python versions and Python environments on your own (i.e., without a package manager like conda
). See the Using the workflow section to view the end result.
# Download and install P4Merge from here: http://www.perforce.com/product/components/perforce-visual-merge-and-diff-tools | |
# And then add this to your Git config | |
[merge] | |
tool = p4mergetool | |
[mergetool "p4mergetool"] | |
cmd = /Applications/p4merge.app/Contents/Resources/launchp4merge $PWD/$BASE $PWD/$REMOTE $PWD/$LOCAL $PWD/$MERGED | |
trustExitCode = false | |
[diff] | |
tool = p4mergetool |
<?php | |
namespace AppBundle\Composer; | |
use Composer\Script\Event; | |
use Sensio\Bundle\DistributionBundle\Composer\ScriptHandler; | |
class MigrationHandler extends ScriptHandler | |
{ | |
/** |
zend_extension=xdebug.so | |
xdebug.remote_enable=1 | |
xdebug.remote_autostart=1 | |
xdebug.remote_connect_back=0 | |
xdebug.remote_host=192.168.10.254 | |
xdebug.idekey=phpstorm |
/* From https://github.com/raspberrypi-ui/rc_gui/blob/master/src/rc_gui.c#L23-L70 */ | |
#define GET_CAN_EXPAND "sudo raspi-config nonint get_can_expand" | |
#define EXPAND_FS "sudo raspi-config nonint do_expand_rootfs" | |
#define GET_HOSTNAME "sudo raspi-config nonint get_hostname" | |
#define SET_HOSTNAME "sudo raspi-config nonint do_hostname %s" | |
#define GET_BOOT_CLI "sudo raspi-config nonint get_boot_cli" | |
#define GET_AUTOLOGIN "sudo raspi-config nonint get_autologin" | |
#define SET_BOOT_CLI "sudo raspi-config nonint do_boot_behaviour B1" | |
#define SET_BOOT_CLIA "sudo raspi-config nonint do_boot_behaviour B2" | |
#define SET_BOOT_GUI "sudo raspi-config nonint do_boot_behaviour B3" |