Ctrl + a – go to the start of the command line
Ctrl + e – go to the end of the command line
Ctrl + k – delete from cursor to the end of the command line
Ctrl + u – delete from cursor to the start of the command line
Ctrl + w – delete from cursor to start of word (i.e. delete backwards one word)
Ctrl + y – paste word or text that was cut using one of the deletion shortcuts (such as the one above) after the cursor
MARKDOWN | |
# Header 1 # | |
## Header 2 ## | |
### Header 3 ### (Hashes on right are optional) | |
#### Header 4 #### | |
##### Header 5 ##### | |
## Markdown plus h2 with a custom ID ## {#id-goes-here} | |
[Link back to H2](#id-goes-here) |
"\e[1~": beginning-of-line | |
"\e[4~": end-of-line | |
“\e[5~”: history-search-backward | |
“\e[6~”: history-search-forward | |
"\e[3~": delete-char | |
"\e[2~": quoted-insert | |
"\e[5C": forward-word | |
"\e[5D": backward-word | |
"\e\e[C": forward-word | |
"\e\e[D": backward-word |
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
require "open-uri" | |
remote_base_url = | |
"http://api.twitter.com/1/statuses/user_timeline.xml?count=100&screen_name=" | |
twitter_user = "USAGov" | |
remote_full_url = remote_base_url + twitter_user | |
first_page = 1 | |
last_page = 5 | |
(first_page..last_page).each do |page_num| |
Capybara.default_driver = :selenium # Subdomain testing will only work with pow and selenium | |
pow_config = "#{Rails.root}/.powenv" # Dont change, this is the Config Files Location. | |
pow_config_stash = "#{Rails.root}/.powenv_original" # This is what the config will be stashed as during testing. | |
Before do | |
# Set the default host | |
Capybara.app_host = "http://assessory.dev" | |
# Stash the existing config |
fruit = "banana" | |
def revFruit(fruit): | |
index = len(fruit)-1 | |
while index >= 0: | |
letter = fruit[index] | |
print letter | |
index = index - 1 |
def countLetters(str, ch): | |
fruit = str | |
count = 0 | |
for char in fruit: | |
if char == ch: | |
count = count + 1 | |
print count |
When starting a project that includes refinerycms-blog: | |
$ rake refinery:override view=refinery/pages/* | |
$ rake refinery:override view=layouts/* | |
$ rake refinery:override view=refinery/blog/shared/* | |
$ rake refinery:override view=refinery/blog/posts/* | |
$ rake refinery:override view=refinery/* | |
$ rake refinery:override controller=refinery/blog/* | |
$ rake refinery:override controller=refinery/* |
-
As a rule, [CAPTCHAs][1] should be a last resort. They tend to be annoying, often aren't human-solvable, most of them are ineffective against bots, all of them are ineffective against cheap third-world labor (according to [OWASP][2], the current sweatshop rate is $12 per 500 tests), and some implementations are technically illegal in some countries (see link number 1 from the MUST-READ list). If you must use a CAPTCHA, use [reCAPTCHA][3], since it is OCR-hard by definition (since it uses already OCR-misclassified book scans).
-
It is possible to prevent browsers from storing/retrieving a password with the autocomplete tag for forms/input fields. However in the real world, your customers will have many accounts on different systems; it compromises their security if they use the same password for every site. Can you expect them to remember different passwords for every site? There are some good password managers out there, however there are also bad ones - which will become a