I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!
\
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
| # put this in your .bash_profile | |
| if [ $ITERM_SESSION_ID ]; then | |
| export PROMPT_COMMAND='echo -ne "\033];${PWD##*/}\007"; ':"$PROMPT_COMMAND"; | |
| fi | |
| # Piece-by-Piece Explanation: | |
| # the if condition makes sure we only screw with $PROMPT_COMMAND if we're in an iTerm environment | |
| # iTerm happens to give each session a unique $ITERM_SESSION_ID we can use, $ITERM_PROFILE is an option too | |
| # the $PROMPT_COMMAND environment variable is executed every time a command is run | |
| # see: ss64.com/bash/syntax-prompt.html |
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
| " Autoreload .vimrc | |
| autocmd! bufwritepost .vimrc source % | |
| " Settings required to set up Vundle, these two lines at the top | |
| set nocompatible " be iMproved | |
| filetype off " required! | |
| set rtp+=~/.vim/bundle/vundle/ | |
| call vundle#rc() |
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
| -server | |
| -Xms512m | |
| -Xmx2048m | |
| -XX:MaxPermSize=512m | |
| -XX:ReservedCodeCacheSize=256m | |
| -XX:+UseCodeCacheFlushing | |
| -XX:+UseCompressedOops | |
| -XX:+UseConcMarkSweepGC | |
| -XX:+AggressiveOpts | |
| -XX:+CMSClassUnloadingEnabled |
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 | |
| set -o errexit | |
| set -o nounset | |
| set -o pipefail | |
| # Automatically update your CloudFlare DNS record to the IP, Dynamic DNS | |
| # Can retrieve cloudflare Domain id and list zone's, because, lazy | |
| # Place at: | |
| # /usr/local/bin/cf-ddns.sh |
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
| let g:spotify_track_search_url = "http://ws.spotify.com/search/1/track.json?q=" | |
| function! OpenUri(uri) | |
| exec "silent !explorer " . a:uri | |
| endfunction | |
| function! OpenLine() | |
| let uri = b:uris[line(".")-2] | |
| call OpenUri(uri) | |
| endfunction |
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
| // Please comment in case of typos or bugs | |
| import scala.slick.driver.H2Driver._ | |
| val db = Database.for...(...) | |
| case class Record( ... ) | |
| class Records(tag: Tag) extends Table[Record](tag,"RECORDS"){ | |
| ... | |
| def * = ... <> (Record.tupled,Record.unapply) | |
| // place additional methods here which return values of type Column |
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 | |
| if [ $# -lt 2 ]; then | |
| echo "format: git_cleanup <repo name> [-x/--expunge <directory 1> -l/--keeplatest <directory 2> ...]" | |
| exit | |
| fi | |
| PROJ="$1" | |
| shift |
If you don't want to build Squid from scratch, you can simply Setup a Squid anonymous proxy
Please note that this whole manual refers to the version 3.5.23 of Squid. You probably would have to adapt some commands to the version you will actually download.