- In as much detail as you like, explain what happens when I type "google.com" into my browser's address bar and press enter.
- Explain the difference between dynamic vs. static programming languages? What are the advantages/disadvantages of each?
- What's something you love/hate about your favorite programming language?
- What tools do you use for your day to day work? Language, IDEs/editors, version control, build systems, provisioning, etc.?
- What's the difference between an class vs. an object?
- What is inheritance? What are some alternate ways to reuse logic without using it? What are some downsides to it?
This file contains 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
class State | |
include ActiveModel::Conversion | |
extend ActiveModel::Naming | |
attr_reader :all | |
US_STATES = { | |
AL: "Alabama", | |
AK: "Alaska", | |
AZ: "Arizona", |
This file contains 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 | |
fail() { | |
echo "Whoops... $*" | |
exit 1 | |
} | |
if [ ! -d /opt/boxen ] ; then | |
sudo mkdir -p /opt/boxen && sudo chown ${USER}:staff /opt/boxen | |
fi || fail "could not create /opt/boxen" |
This file contains 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
pathmunge () { | |
if [ "$2" = "force" ] || ! echo $PATH | $(which egrep) -q "(^|:)$1($|:)" | |
then | |
if [ "$2" = "after" ] | |
then | |
PATH=$PATH:$1 | |
else | |
PATH=$1:$PATH | |
fi | |
export PATH |
This file contains 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 | |
sudo /sbin/route add -net x.x.x.0/24 xxx.xxx.xxx.xxx | |
# Save this file somewhere and make it executable (chmod a+x <file>) | |
# Then run 'sudo defaults write com.apple.loginwindow LoginHook /Path/To/Your/Script' |
This file contains 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
require 'optparse' | |
require 'ostruct' | |
class OptParse | |
# | |
# Return a structure describing the options. | |
# | |
def self.parse(args) | |
# The options specified on the command line will be collected in *options*. | |
# We set default values here. |
This file contains 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
export default { | |
getParams() { | |
const scripts = document.getElementsByTagName('script'), | |
myScript = scripts[scripts.length - 1], | |
query = myScript.src.replace(/^[^\?]+\??/, ''); | |
let Params = {}; | |
if ( !query ) { return Params } // return empty object |
Related Setup: https://gist.github.com/hofmannsven/6814278
Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
This file contains 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 | |
PROGRAM=$(basename $0) | |
VERSION="0.0.1" | |
OPT_VERBOSE=0 | |
OPT_FORCE=0 | |
OPT_CLEAN=0 | |
OPT_TEST=0 | |
# Verbose modes |
-
Install Kafka
cd /opt curl -O http://www.gtlib.gatech.edu/pub/apache/kafka/0.11.0.0/kafka_2.11-0.11.0.0.tgz tar xvzf kafka_2.11-0.11.0.0.tgz ln -s kafka_2.11-0.11.0.0/ kafka
-
Edit
/usr/lib/systemd/system/kafka-zookeeper.service
OlderNewer