Skip to content

Instantly share code, notes, and snippets.

View mdmartinez's full-sized avatar
🎯
Focusing

Daniel Martinez mdmartinez

🎯
Focusing
View GitHub Profile
var sFoo = “bar”;
var foo = “bar”;
var Foo = function() {
var bar = “baz”;
}
var Foo = function() {
var _bar = “baz”;
}
var bar = "Baz";
foo(); // => Hello Baz
function foo() {
console.log("Hello " + bar);
};
var bar = “Baz”;
foo(); // => TypeError: undefined is not a function
var foo = function() {
console.log(“Hello ” + bar);
};

grep -v "example" // This will match everything EXCEPT "example"

awk "/example/" // Use awk when you want to do regex. This will match "example"

when coping all files and folders, use cp -R <current_directory> <new_directory>
@mdmartinez
mdmartinez / gist:9dd0e0cb79d1892bffd7
Last active January 20, 2018 16:23
Sublime Reminder
control + command + up/down moves an entire line
hold command and click multiple times for multiple cursors
command T can create a new tab from a file
command P jumps to search text in a file
commmand shift F searches entire app
## Fresh App Stuff
rails new myapp --database=postgresql -T
## Gemfile add: rspec, factory_girl, capybara, bcrypt
gem 'rspec-rails', '~> 3.0'
## Delete all references to turbolinks
Bundle
rails g rspec:install
# Testing