Quick snippets to install various asdf plugins:
asdf plugin-add python
Head to https://github.com/asdf-vm/asdf-nodejs#requirements for the requirements
Quick snippets to install various asdf plugins:
asdf plugin-add python
Head to https://github.com/asdf-vm/asdf-nodejs#requirements for the requirements
beginning = Time.now | |
1.upto(100).each do |i| | |
puts i | |
end | |
puts "Elapsed #{Time.now - beginning}" |
-module(exp). | |
-export([parse_expression/1, evaluate_expression/1]). | |
parse_expression(Exp) -> | |
parse_acc(Exp, {unknown, unknown, unknown}). | |
convert_operator(Char) -> | |
case Char of | |
$- -> minus; | |
$+ -> plus; |
[alias] | |
co = checkout | |
ci = commit | |
br = branch | |
st = status | |
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit | |
m = checkout master | |
fo = fetch origin | |
mom = merge origin master | |
sweep = !git branch --merged master | grep -v 'master$' | xargs git branch -d\ |
require 'mongo' | |
#Here I don't have any mongod listening on port 29017 | |
client = Mongo::Client.new([ "127.0.0.1:29017", '127.0.0.1:27017' ], :database => 'test') | |
result = client[:artists].insert_one({ name: 'FKA Twigs' }) |
Mongoid 5 is a major upgrade to Mongoid for several reasons :
Here is a non comprehensive list of things to chexk or upgrade.
sessions
entry has been replaced by the clients
entry.Moped::
classes like Errors
or BSON
don't exist anymore.bod = "\r\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n--- \n**Pivotal Tracker** - [#100934594](https://www.pivotaltracker.com/story/show/100765594)\n*Estimation*: **2.0 points**\n*ETA*: **14th August 2015**\n\n--- \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n" | |
reg = /^--- (.|\n)*--- /m | |
hello = "hi" | |
bod.gsub(reg, hello) |
<%= javascript_include_tag "react/application" %> |
config.assets.precompile += ['react/application.js'] |
//= require ./bundle.js |