Key/Command | Description |
---|---|
Tab | Auto-complete files and folder names |
Ctrl + A | Go to the beginning of the line you are currently typing on |
Ctrl + E | Go to the end of the line you are currently typing on |
Ctrl + U | Clear the line before the cursor |
Ctrl + K | Clear the line after the cursor |
Ctrl + W | Delete the word before the cursor |
Ctrl + T | Swap the last two characters before the cursor |
# === EDITOR === | |
Pry.editor = 'vim' | |
# == Pry-Nav - Using pry as a debugger == | |
Pry.commands.alias_command 'c', 'continue' rescue nil | |
Pry.commands.alias_command 's', 'step' rescue nil | |
Pry.commands.alias_command 'n', 'next' rescue nil | |
Pry.commands.alias_command 'r!', 'reload!' rescue nil | |
Pry.config.color = true |
Command Line
pry -r ./config/app_init_file.rb
- load your app into a pry session (look at the file loaded by config.ru)pry -r ./config/environment.rb
- load your rails into a pry session
Debugger
require 'sinatra/base' | |
require 'minitest/autorun' | |
require 'minitest/spec' | |
require "rack/test" | |
require 'nokogiri' | |
class MyApp < Sinatra::Base | |
enable :inline_templates | |
get '/users/:id' do |
This syntax feature is not part of the original Markdown syntax. The idea and syntax comes from the PHP Markdown Extra package.
Footnotes in kramdown are similar to reference style links and link definitions. You need to place the footnote marker in the correct position in the text and the actual footnote content can be defined anywhere in the document.
More exactly, a footnote marker can be created by placing the footnote name in square brackets. The footnote name has to start with a caret (^), followed by a word character or a digit and then optionally followed by other word characters, digits or dashes. For example:
# coding: utf-8 | |
require 'rubygems' | |
require 'hpricot' | |
require 'nokogiri' | |
require 'fileutils' | |
require 'safe_yaml' | |
require 'time' | |
require 'uri' | |
require 'open-uri' |
// Usage: | |
// Copy and paste all of this into a debug console window of the "Who is Hiring?" comment thread | |
// then use as follows: | |
// | |
// query(term | [term, term, ...], term | [term, term, ...], ...) | |
// | |
// When arguments are in an array then that means an "or" and when they are seperate that means "and" | |
// | |
// Term is of the format: | |
// ((-)text/RegExp) ( '-' means negation ) |
This tutorial will help guide you through the process of setting up a new Ruby on Rails project with robust testing capabilities. This tutorial makes a couple of assumptions:
- You have installed Ruby on Rails and have a rudimentary understanding of how to use it.
- You have installed bundler
from flask import Flask | |
from flask import render_template | |
import csv | |
import json | |
app = Flask(__name__) | |
@app.route('/') | |
def my_runs(): | |
runs = [] |
<? | |
// | |
// [ BUY BTC & ETH DAILY ON BITSTAMP ] | |
// by @levelsio | |
// | |
// 2017-08-23 | |
// | |
// 1) buy $40/day BTC | |
// 2) buy $10/day ETH | |
// |