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
| # get homebrew http://mxcl.github.com/homebrew/ | |
| ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)" | |
| # use homebrew to install rbenv and ruby-build | |
| brew update | |
| brew install rbenv | |
| brew install ruby-build | |
| # view available rubies | |
| rbenv install --list |
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
| <!--- STEP 1 - ?event=shop-cart.cfm ---> | |
| <cfscript> | |
| stDetails = structNew(); | |
| stDetails.cartTotal = 200.00; | |
| stDetails.invoiceno = 3; | |
| </cfscript> | |
| <cfhttp url="https://api-3t.paypal.com/nvp" method="post"> | |
| <!--- auth ---> | |
| <cfhttpparam type="formfield" name="USER" value="#application.pp.username#" /> |
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
| # create rails app - option allows you to write test suite in rspec instead of default | |
| rails new demo_app --skip-test-unit | |
| # production only gems located in gemfile (pg = postgres) | |
| group :production do | |
| gem 'pg', '0.12.2' | |
| end | |
| # dev and test env | |
| group :development, :test do |
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
| # create ssh key https://help.github.com/articles/generating-ssh-keys | |
| # create repo https://github.com/new | |
| git init | |
| git add . | |
| git commit -m "Initial commit" | |
| git mv README.rdoc README.md | |
| git commit -a -m "Improve the README" |
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
| #gem file config | |
| group :development, :test do | |
| gem 'sqlite3', '1.3.5' | |
| gem 'rspec-rails', '2.11.0' | |
| gem 'guard-rspec', '1.2.1' | |
| end | |
| group :test do | |
| gem 'capybara', '1.1.2' |
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
| DROP TEMPORARY TABLE IF EXISTS tempTable; | |
| CREATE TEMPORARY TABLE tempTable (id INT, fkid INT, comment TEXT); | |
| INSERT INTO tempTable SELECT id, fid, comment FROM table WHERE DATE(commentDate) = DATE_ADD(DATE(now()), INTERVAL -2 DAY); | |
| SELECT * FROM tempComment WHERE comment like 'textstring%' |
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
| /* logging example */ | |
| BEGIN | |
| IF new.status <> old.status | |
| THEN | |
| INSERT INTO pstatus_log(dtCreated, statusOld, statusNew, fkid) | |
| VALUES (now(), old.status, new.status, new.fkid); | |
| END IF; | |
| END |
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
| <cfscript> | |
| stQuery = structNew(); | |
| </cfscript> | |
| <cfquery name="stQuery.a" datasource="#request.ds#"> | |
| SELECT * | |
| FROM table1 | |
| </cfquery> | |
| <cfquery name="stQuery.b" datasource="#request.ds#"> |
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
| sudo apt-get update | |
| sudo apt-get upgrade | |
| sudo apt-get install openssh-server | |
| sudo reboot | |
| ## shared folders |
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
| keytool -genkey -dname "cn=127.0.0.1, ou=CF, o=robjshaw, L=Sydney, ST=NSW, C=AU" -keyalg rsa -keystore mykey | |
| keytool -importkeystore -srckeystore mykey -destkeystore mykeyout.p12 -deststoretype PKCS12 |
OlderNewer