- Add
pbcopy.plistto your~/Library/LaunchAgents/folder. - Launch the listener with
launchctl load ~/Library/LaunchAgents/pbcopy.plist. - Add
RemoteForward 2224 127.0.0.1:2224in your~/.ssh/configfile under yourHost *or specific hosts sections. - Add
[ -n "$SSH_CLIENT" ] && alias pbcopy="nc localhost 2224"to your remote~/.bash_profileor other shell profile. - Enjoy
pbcopyremotely!
This file contains hidden or 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
| --- | |
| BasedOnStyle: Webkit | |
| SortIncludes: false | |
| ColumnLimit: 80 | |
| AlignTrailingComments: true | |
| AlignConsecutiveMacros: true | |
| AllowShortFunctionsOnASingleLine: false | |
| ... |
This file contains hidden or 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 bash | |
| ### Bash Environment Setup | |
| # http://redsymbol.net/articles/unofficial-bash-strict-mode/ | |
| # https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html | |
| # set -o xtrace | |
| set -o errexit | |
| set -o errtrace | |
| set -o nounset | |
| set -o pipefail |
This file contains hidden or 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 python | |
| from __future__ import print_function, division | |
| __author__ = "Dilawar Singh" | |
| __copyright__ = "Copyright 2017-, Dilawar Singh" | |
| __version__ = "1.0.0" | |
| __maintainer__ = "Dilawar Singh" | |
| __email__ = "dilawars@ncbs.res.in" |
This file contains hidden or 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
| #!/bin/bash | |
| # by Andy Maloney | |
| # http://asmaloney.com/2013/07/howto/packaging-a-mac-os-x-application-using-a-dmg/ | |
| # make sure we are in the correct dir when we double-click a .command file | |
| dir=${0%/*} | |
| if [ -d "$dir" ]; then | |
| cd "$dir" | |
| fi |
This file contains hidden or 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
| #!/bin/bash | |
| SEPARATOR='_' | |
| find . -maxdepth 1 -type f -name "*" -print0 | while read -d $'\0' file | |
| do | |
| IFS=$SEPARATOR read -a _file <<< "$file" | |
| STUDENTDIR="${_file[0]}" | |
| STUDENTDIR="${STUDENTDIR// /_}" | |
| mkdir -p $STUDENTDIR | |
| echo "Moving $file to $STUDENTDIR" | |
| mv "$file" $STUDENTDIR |
This file contains hidden or 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
| # A text book example from MacKay. | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| import matplotlib.lines as mlines | |
| import matplotlib.patches as mpatches | |
| def plotLetter(letter, itr): | |
| black = '#000000'; white='#FFFFFF'; gray='#AAAAAA' | |
| squareSide = 0.03 | |
This file contains hidden or 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
| def count_spikes(tables, threshold): | |
| '''Count the number of spikes, also pupulate the spikeTables ''' | |
| nSpikes = 0 | |
| spikeBegin = False | |
| spikeEnds = False | |
| clock = moose.Clock('/clock') | |
| for tname in tables: | |
| t = tables[tname] | |
| dt = clock.currentTime / len(t.vector) | |
| spikeList = [] |
This file contains hidden or 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
| """query.py: | |
| Searches each row of query sheet in columns of database sheet. | |
| """ | |
| __author__ = "Dilawar Singh" | |
| __copyright__ = "Copyright 2015, Dilawar Singh and NCBS Bangalore" | |
| __credits__ = ["NCBS Bangalore"] | |
| __license__ = "GNU GPL" |