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
git fetch | |
git checkout <branch> |
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
//Manning, Joshua | |
//CSE 100 | |
//[email protected] | |
//HW1_Weights | |
#include <iostream> | |
using namespace std; | |
int main() | |
{ |
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
$ irb -ryaml | |
>> YAML.load_file 'x.yml' |
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
<link rel="import" href="../code-mirror/code-mirror.html"> | |
<link rel="import" href="../topeka-elements/avatars.html"> | |
<link rel="import" href="../core-icon/core-icon.html"> | |
<link rel="import" href="../paper-checkbox/paper-checkbox.html"> | |
<link rel="import" href="../speech-mic/speech-mic.html"> | |
<link rel="import" href="../core-scaffold/core-scaffold.html"> | |
<link rel="import" href="../core-header-panel/core-header-panel.html"> | |
<link rel="import" href="../core-menu/core-menu.html"> | |
<link rel="import" href="../core-item/core-item.html"> | |
<link rel="import" href="../core-icon-button/core-icon-button.html"> |
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 | |
### | |
# | |
# Ubuntu 12.04 based web server installation script | |
# Run this by executing the following from a fresh install of Ubuntu 12.04 server: | |
# | |
# bash -c "$(curl -fsSL https://raw.github.com/gist/4372049)" <mysqlPassword> | |
# | |
# Be sure to replace <mysqlPassword> with your intended MySQL Password. |
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
to change root user password | |
mysql -u root -h localhost -p | |
root | |
mysql> use mysql; | |
mysql> update user set password=PASSWORD("") where User='root'; | |
mysql> flush privileges; | |
mysql> quit | |
update user set password=PASSWORD("foobar") where User='root'; |
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
#scoping capybara | |
within(".comment") do | |
click_on("View") | |
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
require 'json' | |
require 'open-uri' | |
url = "http://www.google.com/finance/info?infotype=infoquoteall&q=goog" | |
json = open(url).read[3..-1] | |
result = JSON.parse json | |
result.first["yld"] |
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
msgs = YAML::load(File.open("#{::Rails.root.to_s}/config/locales/devise.en.yml")) | |
msgs['en']['devise']['failure']['unauthenticated'] |
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
1) add gem | |
2) create vendor directory, and download script | |
3) configure application.rb | |
4) write js that points the trigger to the displayer | |
5) ensure the trigger has the correct jquery selector | |
6) ensure the displayer has the correct jquery selector | |
1) add gem | |
gem 'rack-pjax' |