Source: http://willandorla.com/will/2011/01/convert-folder-into-git-submodule/
$ git clone --no-hardlinks original-repo copied-repo
''' | |
Tests different methods of concatenating files in Python. | |
''' | |
from __future__ import print_function | |
import json,os,shutil,subprocess | |
import util | |
def verify(file,expected): | |
count = 0 |
# just add the below to setenv.sh | |
CATALINA_OPTS="$CATALINA_OPTS -Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.port=9090 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Djava.rmi.server.hostname=172.17.12.99" | |
# inspired by http://blog.markshead.com/1129/connecting-visual-vm-to-tomcat-7/ |
# | |
# Working with branches | |
# | |
# Get the current branch name (not so useful in itself, but used in | |
# other aliases) | |
branch-name = "!git rev-parse --abbrev-ref HEAD" | |
# Push the current branch to the remote "origin", and set it to track | |
# the upstream branch | |
publish = "!git push -u origin $(git branch-name)" |
Source: http://willandorla.com/will/2011/01/convert-folder-into-git-submodule/
$ git clone --no-hardlinks original-repo copied-repo
Previous versions used homebrew to install the various versions. As suggested in the comments, it's better to use pyenv
instead. If you are looking for the previous version of this document, see the revision history.
$ brew update
$ brew install pyenv
$ pyenv install 3.5.0
$ pyenv install 3.4.3
$ pyenv install 3.3.6
$ pyenv install 3.2.6
$ pyenv install 2.7.10
$ pyenv install 2.6.9
" Pathogen : https://github.com/tpope/vim-pathogen | |
execute pathogen#infect() | |
set nocompatible " be iMproved | |
filetype off " required! | |
" Setting up Vundle - the vim plugin bundler | |
let iCanHazVundle=1 | |
let vundle_readme=expand('~/.vim/bundle/vundle/README.md') | |
if !filereadable(vundle_readme) | |
echo "Installing Vundle.." |
A complete list of RxJS 5 operators with easy to understand explanations and runnable examples.
#Error management in gulp
Sucking at something is the first step to becoming sorta good at something
No one can assure you, that plugins will run smooth in any circumstances (except for tests - they could), so neither should you convince anyone, that your plugin will never break. Only thing, that you could possibly do (if something gone wrong) - is gracefully inform your plugin user, that something went wrong and die.
We are will use this plugin from beginning to demonstrate error management. Suppose you have a task in gulpfile.js
that contains this code (we modified it a little bit to be closer to real-usage):
var coffee = require('gulp-coffee');
function translateError(msg) { | |
var newErr = new Error(msg); // placed here to get correct stack | |
return e => { | |
newErr.originalError = e; | |
throw newErr; | |
} | |
} | |
async function asyncTask() { | |
const user = await UserModel.findById(1).catch(translateError('No user found')) |
import com.lambdaworks.redis.resource.DefaultClientResources; | |
import com.lambdaworks.redis.resource.Delay; | |
import org.apache.commons.pool2.impl.GenericObjectPoolConfig; | |
import org.springframework.beans.factory.annotation.Value; | |
import org.springframework.cache.CacheManager; | |
import org.springframework.cache.annotation.CachingConfigurerSupport; | |
import org.springframework.cache.annotation.EnableCaching; | |
import org.springframework.cache.interceptor.CacheErrorHandler; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; |