- Related Setup: https://gist.github.com/hofmannsven/6814278
- Related Pro Tips: https://ochronus.com/git-tips-from-the-trenches/
- Interactive Beginners Tutorial: http://try.github.io/
- Git Cheatsheet by GitHub: https://services.github.com/on-demand/downloads/github-git-cheat-sheet/
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
group :spec do | |
guard('rspec', all_on_start: false, | |
all_after_pass: false, | |
run_all: { parallel: true, parallel_cli: '-n 4' }, | |
cmd: 'zeus rspec', | |
notification: true, | |
failed_mode: :keep) do | |
watch(%r{^spec/.+_spec\.rb$}) | |
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
var k, aa = "function" == typeof Object.defineProperties ? Object.defineProperty : function(a, b, c) { | |
if (c.get || c.set) throw new TypeError("ES3 does not support getters and setters."); | |
a != Array.prototype && a != Object.prototype && (a[b] = c.value) | |
}, | |
ba = "undefined" != typeof window && window === this ? this : "undefined" != typeof global && null != global ? global : this, | |
ca = function(a, b) { | |
if (b) { | |
for (var c = ba, d = a.split("."), e = 0; e < d.length - 1; e++) { | |
var f = d[e]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zsh histroy | |
pry history |
https://www.labnol.org/internet/regular-expressions-forms/28380/
[a-zA-Z\d\s\-\,\#\.\+]+
allow only alphanumeric characters, spaces and few other characters like comma, period and hash symbol in the form input field.
^\d{5,6}(?:[-\s]\d{4})?$
the regex allows ZIP codes in standard formats and it matches both US and Indian pincodes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# first: mkdir user && cd user && cp /path/to/get_gists.py . | |
# python3 get_gists.py user | |
import requests | |
import sys | |
from subprocess import call | |
user = sys.argv[1] | |
r = requests.get('https://api.github.com/users/{0}/gists'.format(user)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://angularfirebase.com/ | |
https://1stwebdesigner.com/copy-and-paste-css-animation-cheat-sheets/ - copy paste css animations |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MyClass | |
# All of these are equivalent | |
def self.myMethod | |
true | |
end | |
def MyClass.myMethod | |
true | |
end |
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
I hereby claim:
- I am brossetti1 on github.
- I am brossetti1 (https://keybase.io/brossetti1) on keybase.
- I have a public key ASANGNqg1IjCMOv0QDBUhTvrmM1ty3w8P14XRSubi3qVgAo
To claim this, I am signing this object: