start new:
tmux
start new with session name:
tmux new -s myname
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc | |
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/ | |
// author: Pawel Kozlowski | |
var myApp = angular.module('myApp', []); | |
//service style, probably the simplest one | |
myApp.service('helloWorldFromService', function() { | |
this.sayHello = function() { | |
return "Hello, World!" |
=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') |
#!/bin/sh | |
# | |
# Salve este script no diretório /etc/cron.hourly e dê permissão | |
# de execução a ele. Desse modo a cada hora sera verificada se a | |
# porcentagem de memória utilizada pelo sistema atingiu o valor definido | |
# na variável 'percent'. Caso positivo, o script informará ao kernel | |
# que este deverá alterar o valor da opção 'drop_caches' para 3. | |
# | |
# Mais detalhes: 'man proc' -> /proc/sys/vm/drop_caches. | |
PATH="/bin:/usr/bin:/usr/local/bin" |
To improve collaboration this guide is now available on GitHub.
pt-BR: | |
views: | |
admin: | |
home: | |
name: Home | |
pagination: | |
previous: "« Anterior" | |
next: "Próximo »" | |
truncate: "…" | |
misc: |
class API::V1::BaseController < ApplicationController | |
skip_before_filter :verify_authenticity_token | |
before_filter :cors_preflight_check | |
after_filter :cors_set_access_control_headers | |
def cors_set_access_control_headers | |
headers['Access-Control-Allow-Origin'] = '*' | |
headers['Access-Control-Allow-Methods'] = 'POST, GET, PUT, DELETE, OPTIONS' |
module Wysihtml5Helper | |
def fill_in_wysihtml5(text) | |
#js must be enabled | |
page.execute_script("editor.setValue('#{text}')") | |
end | |
end |