Compare commits
6 Commits
a6973ace15
...
master
Author | SHA1 | Date | |
---|---|---|---|
07f3d361d1 | |||
0be93c3520 | |||
9718fb26ba | |||
72c0f1b3c8 | |||
99533ff670 | |||
4ddeb426d2 |
1
.gitignore
vendored
1
.gitignore
vendored
@@ -2,3 +2,4 @@
|
|||||||
sublime/User/Package Control.last-run
|
sublime/User/Package Control.last-run
|
||||||
sublime/User/Package Control.system-ca-bundle
|
sublime/User/Package Control.system-ca-bundle
|
||||||
bash_completion.d
|
bash_completion.d
|
||||||
|
resources/git-template/hooks
|
||||||
|
@@ -1,5 +1,8 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
VERSION=$1
|
||||||
|
shift 1
|
||||||
|
|
||||||
COMMAND=$1;
|
COMMAND=$1;
|
||||||
shift 1
|
shift 1
|
||||||
|
|
||||||
@@ -12,4 +15,4 @@ if [ ! -f "${COMMAND}" ]; then
|
|||||||
exit 1;
|
exit 1;
|
||||||
fi
|
fi
|
||||||
|
|
||||||
PHP_IDE_CONFIG="serverName=local" XDEBUG_CONFIG="remote_enable=1 remote_mode=req remote_port=9000 remote_host=127.0.0.1 remote_connect_back=0" php -d zend_extension=xdebug.so $COMMAND "$@"
|
PHP_IDE_CONFIG="serverName=local" XDEBUG_CONFIG="remote_enable=1 remote_mode=req remote_port=9000 remote_host=127.0.0.1 remote_connect_back=0" php$VERSION -d zend_extension=xdebug.so $COMMAND "$@"
|
||||||
|
@@ -15,14 +15,10 @@ alias t="tmux"
|
|||||||
alias x+="chmod +x"
|
alias x+="chmod +x"
|
||||||
alias +x="chmod +x"
|
alias +x="chmod +x"
|
||||||
|
|
||||||
# Devstack
|
|
||||||
alias comup='pushd ~/src/comandi/dashboard; vagrant up; popd'
|
|
||||||
alias comdown='pushd ~/src/comandi/dashboard; vagrant halt; popd'
|
|
||||||
|
|
||||||
|
|
||||||
if [ `uname` == 'Linux' ]; then
|
if [ `uname` == 'Linux' ]; then
|
||||||
alias open='xdg-open'
|
alias open='xdg-open'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Remove all local branches already merged in master.
|
# Remove all local branches already merged in master.
|
||||||
alias gitclean='git branch --merged master | grep -v "\smaster$" | grep -v "*" | xargs --no-run-if-empty git branch -d'
|
alias gitclean='git branch --merged master | grep -v "\smaster$" | grep -v "*" | xargs --no-run-if-empty git branch -d'
|
||||||
alias gist='gist -c'
|
alias gist='gist -c'
|
||||||
@@ -78,7 +74,7 @@ for method in GET HEAD POST PUT DELETE TRACE OPTIONS; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# Download file and save it with filename of remote file
|
# Download file and save it with filename of remote file
|
||||||
alias get="curl -O"
|
alias get="curl -LO"
|
||||||
|
|
||||||
# Convert line endings to UNIX
|
# Convert line endings to UNIX
|
||||||
# tr -d '\015'
|
# tr -d '\015'
|
||||||
|
@@ -157,13 +157,22 @@ function _crlf_file() {
|
|||||||
grep -q $'\x0D' "$1" && echo "$1" && [ $2 ] && dos2unix "$1"
|
grep -q $'\x0D' "$1" && echo "$1" && [ $2 ] && dos2unix "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function git-comandi()
|
||||||
|
{
|
||||||
|
if [ -s ~/.gitlocal ]; then
|
||||||
|
unlink ~/.gitlocal
|
||||||
|
fi
|
||||||
|
|
||||||
|
ln -s ~/.gitlocal_comandi ~/.gitlocal
|
||||||
|
}
|
||||||
|
|
||||||
function git-work()
|
function git-work()
|
||||||
{
|
{
|
||||||
if [ -s ~/.gitlocal ]; then
|
if [ -s ~/.gitlocal ]; then
|
||||||
unlink ~/.gitlocal
|
unlink ~/.gitlocal
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ln -s ~/.gitlocal_work ~/.gitlocal
|
ln -s ~/.gitlocal_yuki ~/.gitlocal
|
||||||
}
|
}
|
||||||
|
|
||||||
function git-private()
|
function git-private()
|
||||||
@@ -180,7 +189,7 @@ for cmd in password hex2hsl hex2rgb escape codepoint ssh-key myip; do
|
|||||||
eval "function $cmd+() { $cmd \$@ | c; }"
|
eval "function $cmd+() { $cmd \$@ | c; }"
|
||||||
done
|
done
|
||||||
|
|
||||||
function jira()
|
function k8s-ssh()
|
||||||
{
|
{
|
||||||
open "https://comandi.atlassian.net/browse/CMD-${1}"
|
ssh admin@$(kubectl describe node $1 | grep -i externaldns | awk '{print $2}')
|
||||||
}
|
}
|
||||||
|
@@ -118,7 +118,7 @@ function validator_php_cs($hash, $fileName, &$output)
|
|||||||
run('git cat-file -p '.escapeshellarg($hash).' > '.$tmp);
|
run('git cat-file -p '.escapeshellarg($hash).' > '.$tmp);
|
||||||
|
|
||||||
$return = null;
|
$return = null;
|
||||||
run('php-cs-fixer fix --dry-run --verbose --level=symfony'.$configFile.' '.escapeshellarg($tmp), $currentOutput, $return, 'default', 'default');
|
run('php-cs-fixer fix --dry-run --diff --verbose --rules=@Symfony'.$configFile.' '.escapeshellarg($tmp), $currentOutput, $return, 'default', 'default');
|
||||||
|
|
||||||
run('rm -rf '.escapeshellarg($tmpDir));
|
run('rm -rf '.escapeshellarg($tmpDir));
|
||||||
|
|
||||||
|
@@ -1 +0,0 @@
|
|||||||
You can add global git hooks in this directory.
|
|
@@ -1,266 +0,0 @@
|
|||||||
#!/usr/bin/env php
|
|
||||||
<?php
|
|
||||||
/**
|
|
||||||
* .git/hooks/pre-commit
|
|
||||||
*
|
|
||||||
* This pre-commit hooks will check for PHP errors (lint), and make sure the
|
|
||||||
* code is PSR-2 compliant.
|
|
||||||
*
|
|
||||||
* @author Reen Lokum http://github.com/reenl
|
|
||||||
*
|
|
||||||
* The orignal version of this file can be found at:
|
|
||||||
* https://github.com/zendframework/zf2/blob/master/README-GIT.md
|
|
||||||
*
|
|
||||||
* Extended with functionality found at:
|
|
||||||
* http://kvz.io/blog/2013/12/29/one-git-commit-hook-to-rule-them-all/
|
|
||||||
*/
|
|
||||||
|
|
||||||
$exit = 0;
|
|
||||||
|
|
||||||
// Initial commit
|
|
||||||
$against = '4b825dc642cb6eb9a060e54bf8d69288fbee4904';
|
|
||||||
if (run('git rev-parse --verify HEAD > /dev/null')) {
|
|
||||||
$against = 'HEAD';
|
|
||||||
}
|
|
||||||
|
|
||||||
// Only run when we're on a branch (to avoid rebase hell)
|
|
||||||
// http://git-blame.blogspot.nl/2013/06/checking-current-branch-programatically.html
|
|
||||||
$branch = run('git symbolic-ref --short -q HEAD');
|
|
||||||
if (!$branch) {
|
|
||||||
writeln('Not on any branch');
|
|
||||||
exit(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
* collect all files which have been added, copied or
|
|
||||||
* modified and store them in an array called output
|
|
||||||
*/
|
|
||||||
$diffLines = array();
|
|
||||||
exec('git diff-index --cached --full-index --diff-filter=ACM '.$against, $diffLines);
|
|
||||||
|
|
||||||
writeln();
|
|
||||||
|
|
||||||
// Filter files that don't need a check.
|
|
||||||
foreach ($diffLines as $line) {
|
|
||||||
$partList = preg_split('#\s+#', $line, 6);
|
|
||||||
$hash = $partList[3];
|
|
||||||
$status = $partList[4];
|
|
||||||
$fileName = $partList[5];
|
|
||||||
if ('D' === $status) {
|
|
||||||
// deleted file; do nothing
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$type = strtolower(pathinfo($fileName, PATHINFO_EXTENSION));
|
|
||||||
$validator = 'validator_'.$type;
|
|
||||||
if (!$type || !function_exists($validator)) {
|
|
||||||
$type = run("git cat-file -p ".$hash." | head -n1 | awk -F/ '/^#\!/ {print \$NF}' | sed 's/^env //g'");
|
|
||||||
$validator = 'validator_'.$type;
|
|
||||||
if (!function_exists($validator)) {
|
|
||||||
// No validator
|
|
||||||
writeln(' Skipping "'.format($fileName, 'green').'" no validator available.');
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
write(' Checking "'.format($fileName, 'green').'" with validator '.format($type, 'green').'.');
|
|
||||||
|
|
||||||
$output = '';
|
|
||||||
if (!$validator($hash, $fileName, $output)) {
|
|
||||||
writeln(PHP_EOL.'X ERROR '.implode(PHP_EOL.' ', explode(PHP_EOL, $output)).PHP_EOL, 'red');
|
|
||||||
$exit = 1;
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
writeln(' OK', 'green');
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($exit > 0) {
|
|
||||||
writeln(PHP_EOL."Please fix the above errors and run 'git add'.", 'gray');
|
|
||||||
}
|
|
||||||
|
|
||||||
exit($exit);
|
|
||||||
|
|
||||||
function validator_php($hash, $fileName, &$output)
|
|
||||||
{
|
|
||||||
if (validator_php_syntax($hash, $fileName, $output)) {
|
|
||||||
return validator_php_cs($hash, $fileName, $output);
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
function validator_php_syntax($hash, $fileName, &$output)
|
|
||||||
{
|
|
||||||
$output = '';
|
|
||||||
$exitCode = 0;
|
|
||||||
|
|
||||||
$result = run('git cat-file -p '.escapeshellarg($hash).' | php -l', $output, $exitCode, "purge", "default");
|
|
||||||
if ($result) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
$output = 'Syntax Error'.PHP_EOL.$output;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
function validator_php_cs($hash, $fileName, &$output)
|
|
||||||
{
|
|
||||||
// Use .php_cs config if project has one.
|
|
||||||
$configFile = '';
|
|
||||||
if (file_exists('.php_cs')) {
|
|
||||||
$configFile = ' --config-file='.escapeshellarg(realpath('.php_cs'));
|
|
||||||
}
|
|
||||||
|
|
||||||
$tmpDir = '/tmp/cs-check/'.$hash;
|
|
||||||
$tmp = $tmpDir.'/'.$fileName;
|
|
||||||
run('mkdir -p '.dirname($tmp));
|
|
||||||
run('git cat-file -p '.escapeshellarg($hash).' > '.$tmp);
|
|
||||||
|
|
||||||
$return = null;
|
|
||||||
run('php-cs-fixer fix --dry-run --verbose --level=symfony'.$configFile.' '.escapeshellarg($tmp), $currentOutput, $return, 'default', 'default');
|
|
||||||
|
|
||||||
run('rm -rf '.escapeshellarg($tmpDir));
|
|
||||||
|
|
||||||
// Check output
|
|
||||||
if ($return !== 0) {
|
|
||||||
$out = explode(PHP_EOL, $currentOutput);
|
|
||||||
|
|
||||||
$rule = null;
|
|
||||||
foreach ($out as $line) {
|
|
||||||
if (preg_match('#\s+[0-9]+\)\s#', $line)) {
|
|
||||||
$rule = $line;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($rule !== null && preg_match('#\((.*)\)#', $rule, $matches)) {
|
|
||||||
$output = 'Code Style errors'.PHP_EOL.$matches[1];
|
|
||||||
} else {
|
|
||||||
$output = 'Code Style errors'.PHP_EOL.implode(PHP_EOL, $out).PHP_EOL;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Runs like exec with a few changes:
|
|
||||||
* - Output is returned as a string.
|
|
||||||
* - Output is NOT appended.
|
|
||||||
* - STDERR is also added to the output.
|
|
||||||
* - STDERR and/or STDOUT can be disabled by passing purge.
|
|
||||||
* - Returns the first output line if successful and false when failed.
|
|
||||||
* - If no output is generated and the exit status equals 0 then true is returned.
|
|
||||||
*
|
|
||||||
* @param string $command
|
|
||||||
* @param string &$output
|
|
||||||
* @param int &$exitCode
|
|
||||||
* @param string $stdout
|
|
||||||
* @param string $stderr
|
|
||||||
*
|
|
||||||
* @return boolean
|
|
||||||
*/
|
|
||||||
function run($command, &$output = '', &$exitCode = 0, $stdout = 'default', $stderr = 'purge')
|
|
||||||
{
|
|
||||||
$descriptors = array(
|
|
||||||
0 => array("pipe", "r"), // stdin
|
|
||||||
1 => array("pipe", "w"), // stdout
|
|
||||||
2 => array("pipe", "w"), // stderr
|
|
||||||
);
|
|
||||||
|
|
||||||
$pipes = array();
|
|
||||||
|
|
||||||
$out = array();
|
|
||||||
$process = proc_open($command, $descriptors, $pipes);
|
|
||||||
fclose($pipes[0]);
|
|
||||||
unset($pipes[0]);
|
|
||||||
|
|
||||||
do {
|
|
||||||
$read = $pipes;
|
|
||||||
$write = $except = array();
|
|
||||||
if (!stream_select($read, $write, $except, 5)) {
|
|
||||||
writeln('Timeout on process: '.$command, 'red');
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
foreach ($read as $pipe) {
|
|
||||||
$pipeId = array_search($pipe, $pipes);
|
|
||||||
if ($pipeId === false) {
|
|
||||||
writeln('Unable to determine where the output came from.', 'red');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (feof($pipe)) {
|
|
||||||
fclose($pipe);
|
|
||||||
if ($pipeId !== false) {
|
|
||||||
unset($pipes[$pipeId]);
|
|
||||||
}
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$line = fgets($pipe);
|
|
||||||
if ($line === false) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$color = $stderr;
|
|
||||||
if ($pipeId == 1) {
|
|
||||||
$color = $stdout;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($color != 'purge') {
|
|
||||||
$out[] = format(rtrim($line), $color);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} while (count($pipes) > 0);
|
|
||||||
|
|
||||||
$exitCode = proc_close($process);
|
|
||||||
$output = implode(PHP_EOL, $out);
|
|
||||||
|
|
||||||
if ($exitCode == 0) {
|
|
||||||
if (!isset($out[0]) || $out[0] == '') {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return $out[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
function format($string, $color = 'default')
|
|
||||||
{
|
|
||||||
if ($color == 'default') {
|
|
||||||
return $string;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($color == 'purge') {
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
|
|
||||||
$colors = array(
|
|
||||||
'gray' => 37,
|
|
||||||
'green' => 32,
|
|
||||||
'red' => 31,
|
|
||||||
);
|
|
||||||
|
|
||||||
if (!isset($colors[$color])) {
|
|
||||||
writeln($color.' is not a valid color.');
|
|
||||||
exit(1);
|
|
||||||
}
|
|
||||||
|
|
||||||
return chr(0x1B).'['.$colors[$color].'m'.$string.chr(0x1B).'[m';
|
|
||||||
}
|
|
||||||
|
|
||||||
function writeln($write = '', $color = 'default')
|
|
||||||
{
|
|
||||||
write($write.PHP_EOL, $color);
|
|
||||||
}
|
|
||||||
|
|
||||||
function write($write = '', $color = 'default')
|
|
||||||
{
|
|
||||||
echo format($write, $color);
|
|
||||||
flush();
|
|
||||||
}
|
|
@@ -24,9 +24,6 @@ if command -v apt >/dev/null 2>&1; then
|
|||||||
|
|
||||||
# Add repositories
|
# Add repositories
|
||||||
|
|
||||||
## Hipchat
|
|
||||||
sudo sh -c 'echo "deb https://atlassian.artifactoryonline.com/atlassian/hipchat-apt-client $(lsb_release -c -s) main" > /etc/apt/sources.list.d/atlassian-hipchat4.list'
|
|
||||||
|
|
||||||
## Ondrej PHP PPA
|
## Ondrej PHP PPA
|
||||||
sudo add-apt-repository -y ppa:ondrej/php
|
sudo add-apt-repository -y ppa:ondrej/php
|
||||||
|
|
||||||
@@ -43,16 +40,13 @@ if command -v apt >/dev/null 2>&1; then
|
|||||||
# Install apt packages
|
# Install apt packages
|
||||||
sudo apt install -y \
|
sudo apt install -y \
|
||||||
chromium-browser \
|
chromium-browser \
|
||||||
dkms virtualbox-5.1 \
|
dkms virtualbox-6.0 \
|
||||||
dnsmasq \
|
dnsmasq \
|
||||||
docker-ce \
|
docker-ce \
|
||||||
git \
|
git \
|
||||||
hipchat \
|
|
||||||
htop \
|
htop \
|
||||||
jq \
|
jq \
|
||||||
linux-image-extra-$(uname -r) linux-image-extra-virtual \
|
|
||||||
mysql-workbench \
|
mysql-workbench \
|
||||||
openjdk-9-jdk openjdk-8-jdk \
|
|
||||||
scdaemon pcscd libccid \
|
scdaemon pcscd libccid \
|
||||||
transmission \
|
transmission \
|
||||||
vim \
|
vim \
|
||||||
@@ -60,14 +54,14 @@ if command -v apt >/dev/null 2>&1; then
|
|||||||
|
|
||||||
## Docker Compose
|
## Docker Compose
|
||||||
if [ ! -f /usr/local/bin/docker-compose ]; then
|
if [ ! -f /usr/local/bin/docker-compose ]; then
|
||||||
DOCKER_COMPOSE_VERSION=1.16.1
|
DOCKER_COMPOSE_VERSION=1.23.2
|
||||||
sudo curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose && sudo chmod +x /usr/local/bin/docker-compose
|
sudo curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose && sudo chmod +x /usr/local/bin/docker-compose
|
||||||
sudo curl -L https://raw.githubusercontent.com/docker/compose/${DOCKER_COMPOSE_VERSION}/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose
|
sudo curl -L https://raw.githubusercontent.com/docker/compose/${DOCKER_COMPOSE_VERSION}/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## Vagrant
|
## Vagrant
|
||||||
if [ ! -f /usr/bin/vagrant ]; then
|
if [ ! -f /usr/bin/vagrant ]; then
|
||||||
sudo curl -L https://releases.hashicorp.com/vagrant/2.0.0/vagrant_2.0.0_x86_64.deb -o vagrant.deb && sudo dpkg -i vagrant.deb && rm -rf vagrant.deb
|
sudo curl -L https://releases.hashicorp.com/vagrant/2.2.4/vagrant_2.2.4_x86_64.deb -o vagrant.deb && sudo dpkg -i vagrant.deb && rm -rf vagrant.deb
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
@@ -27,8 +27,8 @@ for option in autocd globstar; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# Locale
|
# Locale
|
||||||
export LC_ALL=en_US.UTF-8
|
export LC_ALL=en_GB.UTF-8
|
||||||
export LANG="en_US"
|
export LANG="en_GB"
|
||||||
|
|
||||||
# Set the composer home.
|
# Set the composer home.
|
||||||
export COMPOSER_HOME="$HOME/.composer"
|
export COMPOSER_HOME="$HOME/.composer"
|
||||||
@@ -41,13 +41,12 @@ function _prepend_path() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Construct $PATH
|
# Construct $PATH
|
||||||
PATH="/usr/bin:/bin:/usr/sbin:/sbin"
|
PATH="/snap/bin:/usr/bin:/bin:/usr/sbin:/sbin"
|
||||||
[ -d /usr/local/sbin ] && _prepend_path "/usr/local/sbin"
|
[ -d /usr/local/sbin ] && _prepend_path "/usr/local/sbin"
|
||||||
[ -d /usr/local/bin ] && _prepend_path "/usr/local/bin"
|
[ -d /usr/local/bin ] && _prepend_path "/usr/local/bin"
|
||||||
[ -f /usr/bin/npm ] && _prepend_path "./node_modules/.bin" # Node.js
|
[ -f /usr/bin/npm ] && _prepend_path "./node_modules/.bin" # Node.js
|
||||||
[ -d /usr/texbin ] && _prepend_path "/usr/texbin" # LaTex
|
[ -d /usr/texbin ] && _prepend_path "/usr/texbin" # LaTex
|
||||||
[ -d $HOME/.cargo/bin ] && _prepend_path "$HOME/.cargo/bin" # Rust
|
[ -d $HOME/.cargo/bin ] && _prepend_path "$HOME/.cargo/bin" # Rust
|
||||||
command -v brew >/dev/null 2>&1 && _prepend_path "$(brew --prefix coreutils)/libexec/gnubin" # Homebrew
|
|
||||||
[ -d $HOME/.local/bin ] && _prepend_path "$HOME/.local/bin" # Local bin
|
[ -d $HOME/.local/bin ] && _prepend_path "$HOME/.local/bin" # Local bin
|
||||||
[ -d $HOME/bin ] && _prepend_path "$HOME/bin" # ~/bin
|
[ -d $HOME/bin ] && _prepend_path "$HOME/bin" # ~/bin
|
||||||
[ -d $HOME/dotfiles/bin ] && _prepend_path "$HOME/dotfiles/bin" # Dotfiles bin
|
[ -d $HOME/dotfiles/bin ] && _prepend_path "$HOME/dotfiles/bin" # Dotfiles bin
|
||||||
@@ -78,14 +77,6 @@ for file in ~/dotfiles/includes/bash_*.bash; do
|
|||||||
done
|
done
|
||||||
unset file
|
unset file
|
||||||
|
|
||||||
if [ `uname` == 'Darwin' ]; then
|
|
||||||
export GOROOT="/usr/local/Cellar/go/1.3/libexec"
|
|
||||||
export GOPATH=$HOME/go
|
|
||||||
|
|
||||||
launchctl setenv GOROOT $GOROOT
|
|
||||||
launchctl setenv GOPATH $GOPATH
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Tell ls to be colourful
|
# Tell ls to be colourful
|
||||||
export CLICOLOR=1
|
export CLICOLOR=1
|
||||||
|
|
||||||
@@ -120,7 +111,9 @@ export PAGER='less'
|
|||||||
# Load extra (private) settings
|
# Load extra (private) settings
|
||||||
[ -f ~/.bashlocal ] && source ~/.bashlocal
|
[ -f ~/.bashlocal ] && source ~/.bashlocal
|
||||||
|
|
||||||
|
# Disable microsoft telemetry
|
||||||
|
export DOTNET_CLI_TELEMETRY_OPTOUT=1
|
||||||
|
export BASH_PROFILE_LOADED=1
|
||||||
|
|
||||||
# Force a green prompt
|
# Force a green prompt
|
||||||
true
|
true
|
||||||
|
|
||||||
export PATH="$HOME/.cargo/bin:$PATH"
|
|
||||||
|
@@ -1,3 +1,5 @@
|
|||||||
# https://github.com/janmoesen/tilde/blob/master/.bashrc
|
# https://github.com/janmoesen/tilde/blob/master/.bashrc
|
||||||
|
|
||||||
[ -n "$PS1" ] && source ~/.bash_profile;
|
[ -n "$BASH_PROFILE_LOADED" ] && source ~/.bash_profile;
|
||||||
|
|
||||||
|
[ -n "$PS1" ] && source ~/.bash_profile;
|
||||||
|
@@ -15,7 +15,8 @@
|
|||||||
editor = vim -f
|
editor = vim -f
|
||||||
# http://stackoverflow.com/questions/136178/git-diff-handling-long-lines
|
# http://stackoverflow.com/questions/136178/git-diff-handling-long-lines
|
||||||
# If doesn't work, try: pager = less -+$LESS -FRX
|
# If doesn't work, try: pager = less -+$LESS -FRX
|
||||||
pager = diff-highlight | less -RFX
|
pager = less -RFX
|
||||||
|
# pager = diff-highlight | less -RFX
|
||||||
# pager = less -r
|
# pager = less -r
|
||||||
autocrlf = false
|
autocrlf = false
|
||||||
safecrlf = false
|
safecrlf = false
|
||||||
@@ -99,3 +100,9 @@
|
|||||||
templatedir = ~/dotfiles/resources/git-template
|
templatedir = ~/dotfiles/resources/git-template
|
||||||
[pull]
|
[pull]
|
||||||
ff = yes
|
ff = yes
|
||||||
|
#[commit]
|
||||||
|
# gpgSign = true
|
||||||
|
[tag]
|
||||||
|
forceSignAnnotated = true
|
||||||
|
[user]
|
||||||
|
signingkey = 6652F0F4418231A7
|
||||||
|
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
# Python stuff
|
# Python stuff
|
||||||
*.pyc
|
*.pyc
|
||||||
VENV
|
VENV
|
||||||
@@ -23,3 +24,4 @@ bower_components
|
|||||||
# IDEs stuff
|
# IDEs stuff
|
||||||
.idea
|
.idea
|
||||||
atlassian-ide-plugin.xml
|
atlassian-ide-plugin.xml
|
||||||
|
.vscode
|
||||||
|
12
update.sh
12
update.sh
@@ -28,11 +28,11 @@ fi
|
|||||||
|
|
||||||
echo -n "Updating composer and dependencies... "
|
echo -n "Updating composer and dependencies... "
|
||||||
bin/composer --quiet self-update
|
bin/composer --quiet self-update
|
||||||
bin/composer --quiet global require \
|
#bin/composer --quiet global require \
|
||||||
fabpot/php-cs-fixer \
|
# fabpot/php-cs-fixer \
|
||||||
phpmd/phpmd \
|
# phpmd/phpmd \
|
||||||
phpunit/phpunit \
|
# phpunit/phpunit \
|
||||||
squizlabs/php_codesniffer
|
# squizlabs/php_codesniffer
|
||||||
|
|
||||||
echo "Done."
|
echo "Done."
|
||||||
|
|
||||||
@@ -41,4 +41,4 @@ then
|
|||||||
ln -s $HOME/dotfiles/resources/git-hooks resources/git-template/hooks
|
ln -s $HOME/dotfiles/resources/git-hooks resources/git-template/hooks
|
||||||
fi
|
fi
|
||||||
|
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
|
Reference in New Issue
Block a user