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 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
dispatch:beforeDispatchLoop | |
dispatch:beforeDispatch | |
dispatch:beforeNotFoundAction | |
dispatch:beforeExecuteRoute | |
dispatch:afterInitialize | |
dispatch:afterExecuteRoute | |
dispatch:afterDispatch | |
dispatch:afterDispatchLoop | |
dispatch:beforeException |
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
Description='A wireless connection using a custom network block configuration' | |
Interface=wlp3s0 | |
Connection=wireless | |
Security=wpa-configsection | |
IP=dhcp | |
WPAConfigSection=( | |
'ssid="university-ssid"' | |
'scan_ssid=1' | |
'key_mgmt=WPA-EAP' | |
'identity="username"' |
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 'openssl' | |
class String | |
def encrypt(key) | |
cipher = OpenSSL::Cipher.new('DES-EDE3-CBC').encrypt | |
cipher.key = Digest::SHA1.hexdigest key | |
s = cipher.update(self) + cipher.final | |
s.unpack('H*')[0].upcase | |
end |
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 | |
# | |
# ~/.xinitrc | |
# Executed by startx (run your window manager from here) | |
# Set up screens and set background | |
if [ `xrandr | grep -c ' connected '` -eq 2 ]; then # dual-monitor | |
if [ `xrandr | grep VGA-1 | grep -c ' connected '` -eq 1 ]; then | |
xrandr --output LVDS-1 --auto --primary --output VGA-1 --auto --right-of LVDS-1 | |
fi |
https://github.com/jnicklas/carrierwave
This example will create an uploader that will upload a file stored in a model Model. The file will be stored locally in development and test environment and will use Amazon S3 in production.
First add the gems.
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
! urxvt | |
URxvt*buffered: true | |
URxvt*cursorBlink: true | |
URxvt*underlineColor: yellow | |
URxvt*font: xft:inconsolata:size=10:antialias=true | |
URxvt*depth: 32 | |
URxvt*borderless: 1 | |
URxvt*scrollBar: false | |
URxvt*loginShell: true | |
Urxvt*secondaryScroll: true # Enable Shift-PageUp/Down in screen |
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
# Update, upgrade and install development tools: | |
apt-get update | |
apt-get -y upgrade | |
apt-get -y install build-essential | |
apt-get -y install git-core | |
# Install rbenv | |
git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv | |
# Add rbenv to the 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
require 'rubygems' | |
# This makes pry itself and all pry gems available | |
$LOAD_PATH.push(*Dir["#{ENV['HOME']}/.prygems/gems/*/lib"]).uniq! | |
begin | |
# Use Pry everywhere | |
require 'pry' | |
rescue LoadError => e | |
end |