- 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
| const MY_DOMAIN = "dilawars.me" | |
| const START_PAGE = "https://www.notion.so/dilawars/Dilawar-Singh-fbc9f970d6da463aa8b2a63ea42e8987" | |
| const DISQUS_SHORTNAME = "dilawars-me" | |
| addEventListener('fetch', event => { | |
| event.respondWith(fetchAndApply(event.request)) | |
| }) | |
| const corsHeaders = { | |
| "Access-Control-Allow-Origin": "*", |
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
| #!/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
| """ | |
| Animation of a head slicing. | |
| Based on a BSD-like licenced code by Gael Varoquaux | |
| http://docs.enthought.com/mayavi/mayavi/auto/example_mri.html | |
| Result: | |
| http://i.imgur.com/EJZELfi.gif | |
| """ |
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
| M1719: |Labc|Ldce|Ebze| 0.20 0.30 0.32 0.32 0.32 0.32 0.263296394963 0.111387109786 0.470177600114 0.029771700191 0.173209325064 3.28129207574 |
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/sh | |
| # Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the | |
| # CREATE block and create them in separate commands _after_ all the INSERTs. | |
| # Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk. | |
| # The mysqldump file is traversed only once. | |
| # Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite | |
| # Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite |
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
| # Screen Options ## | |
| shell bash # Tell screen your default shell | |
| startup_message off # Turn off start message | |
| defscrollback = 5000 | |
| shelltitle '$ |bash' # Dynamic window titled for running program | |
| msgwait 1 # Set messages timeout to one second | |
| nethack on # Turn on nethack error messages | |
| backtick 0 0 0 whoami # Set "%0`" to equal the output of "whoami" | |
| escape ^Oo |