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
gem install mysql2 -v '0.4.10' -- --with-opt-dir=$(brew --prefix openssl) |
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
CREATE DATABASE <database>; | |
CREATE USER '<user>'@'<host>' IDENTIFIED BY '<password>'; | |
GRANT ALL PRIVILEGES ON <database>.* TO '<user>'@'<host>'; | |
FLUSH PRIVILEGES; |
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
# Install dependencies as root | |
apt install -y build-essential libssl-dev libreadline-dev zlib1g-dev | |
# Install rbenv | |
git clone https://github.com/rbenv/rbenv.git ~/.rbenv | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile | |
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile | |
source ~/.bash_profile | |
# Install ruby-build |
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
from selenium import webdriver | |
import json | |
def search(url): | |
driver = webdriver.Chrome() | |
driver.get(url) | |
body = driver.find_element_by_tag_name('pre').text | |
data = json.loads(body) |
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
server { | |
listen 443 ssl; | |
server_name <server>; | |
root /srv/<app>/public; | |
try_files $uri/index.html $uri.html $uri @app; | |
location @app { | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header X-Forwarded-Proto $scheme; |
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
# Install dependencies as root | |
apt install -y git build-essential libssl-dev libreadline-dev zlib1g-dev | |
# Install rbenv | |
git clone https://github.com/rbenv/rbenv.git ~/.rbenv | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile | |
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile | |
source ~/.bash_profile | |
# Install ruby-build |
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
createuser -P dbadmin | |
createuser -P dbuser | |
createdb -O dbadmin db |
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
# Install required packages in CentOS 6 | |
# This should be run as root | |
yum install gcc make zlib zlib-devel readline-devel openssl-devel git | |
# Install rbenv | |
# This should be run as a non-root user | |
git clone https://github.com/sstephenson/rbenv.git ~/.rbenv | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile | |
echo 'eval "$(rbenv init -)"' >> ~/.bash_profile | |
source ~/.bash_profile |
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
[2013-12-01T12:33:04+00:00] INFO: *** Chef 10.14.2 *** | |
[2013-12-01T12:33:04+00:00] INFO: Setting the run_list to ["recipe[chef-server]"] from JSON | |
[2013-12-01T12:33:04+00:00] INFO: Run List is [recipe[chef-server]] | |
[2013-12-01T12:33:04+00:00] INFO: Run List expands to [chef-server] | |
[2013-12-01T12:33:04+00:00] INFO: Starting Chef Run for precise64 | |
[2013-12-01T12:33:04+00:00] INFO: Running start handlers | |
[2013-12-01T12:33:04+00:00] INFO: Start handlers complete. | |
[2013-12-01T12:33:04+00:00] INFO: Omnitruck download-server request: http://www.opscode.com/chef/download-server?p=ubuntu&pv=12.04&m=x86_64&v=latest&prerelease=false&nightlies=false | |
[2013-12-01T12:33:15+00:00] INFO: Downloading chef-server package from: http://opscode-omnibus-packages.s3.amazonaws.com/ubuntu/12.04/x86_64/chef-server_11.0.8-1.ubuntu.12.04_amd64.deb |
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
# Always show tab bar in Terminal.app | |
defaults write com.Apple.Terminal ShowTabBar 1 | |
# Always show tab bar in Safari | |
defaults write com.apple.Safari AlwaysShowTabBar 1 |
NewerOlder