http://guides.rubyonrails.org/migrations.html
- add_column
- add_index
- change_column
- change_table
- create_table
- drop_table
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
/* Estructura y Datos de las Regiones, Provincias */ | |
/* y Comunas de Chile. */ | |
/* */ | |
/* Fecha: Julio 2010 */ | |
/* Autor: Juan Pablo Aqueveque - juque.cl */ | |
-- | |
-- Comunas | |
-- | |
DROP TABLE IF EXISTS `comunas`; |
Basics: | |
-ctrl a c -> create new window | |
-ctrl a A -> set window name | |
-ctrl a w -> show all window | |
-ctrl a 1|2|3|… -> switch to window n | |
-ctrl a " -> choose window | |
-ctrl a ctrl a -> switch between window | |
-ctrl a d -> detach window | |
-ctrl a ? -> help |
function slugify(text) | |
{ | |
return text.toString().toLowerCase() | |
.replace(/\s+/g, '-') // Replace spaces with - | |
.replace(/[^\w\-]+/g, '') // Remove all non-word chars | |
.replace(/\-\-+/g, '-') // Replace multiple - with single - | |
.replace(/^-+/, '') // Trim - from start of text | |
.replace(/-+$/, ''); // Trim - from end of text | |
} |
http://guides.rubyonrails.org/migrations.html
shared_examples_for "driver with javascript support" do | |
before { @driver.visit('/with_js') } | |
describe '#find' do | |
it "should find dynamically changed nodes" do | |
@driver.find('//p').first.text.should == 'I changed it' | |
end | |
end | |
describe '#drag_to' do |
//clang++ -std=c++11 -stdlib=libc++ -framework Foundation nsarray.mm -o nsarray | |
/* Note: | |
* - libstdc++ has been frozen by Apple at a pre-C++11 version, so you must opt | |
for the newer, BSD-licensed libc++ | |
* - Apple clang 4.0 (based on LLVM 3.1svn) does not default to C++11 yet, so | |
you must explicitly specify this language standard. */ | |
/* @file nsarray.mm | |
* @author Jeremy W. Sherman | |
* | |
* Demonstrates three different approaches to converting a std::vector |
+ (void)saveMusicFromURL: (NSURL *)sourceURL | |
toFile: (NSURL *)destURL | |
completion: (void(^)(BOOL success))_completion | |
{ | |
AVURLAsset *asset = [AVURLAsset URLAssetWithURL:sourceURL options:nil]; | |
NSError *err = nil; | |
AVAssetReader *reader = [[AVAssetReader assetReaderWithAsset: asset | |
error: &err] retain]; | |
if(err) |
#!/bin/bash | |
########################################################################### | |
# Choose your ffmpeg version and your currently-installed iOS SDK version: | |
# | |
VERSION="2.0.2" | |
SDKVERSION="7.0" | |
ARCHS="armv7 armv7s i386" | |
# | |
# |