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
require 'test/unit' | |
require 'benchmark' | |
# For Ruby 2.3 | |
# user system total real | |
# Ruby Hash 0.030000 0.000000 0.030000 ( 0.033555) | |
# My Hash 0.360000 0.000000 0.360000 ( 0.367558) | |
# For Ruby 2.4 | |
# user system total real |
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
angular.module("Meek").controller "RadioStationsController", ( | |
$sce | |
$rootScope | |
$scope | |
$stateParams | |
Category | |
RadioStation | |
ApplicationService | |
RankService | |
) -> |
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
source ~/.profile | |
source ~/.git-libs/git-completion.bash | |
source ~/.git-libs/git-prompt.sh | |
export PATH=/usr/local/bin:$PATH | |
export EDITOR='subl -w' | |
alias ns='cd ~/Dropbox/ror/anadea/nowshop' | |
alias jw='cd ~/Dropbox/ror/junior_way' | |
alias cl='cd ~/Dropbox/ror/anadea/clique' |
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
<snippet> | |
<content><![CDATA[ | |
<%= ${1} %> | |
]]></content> | |
<!-- Optional: Set a tabTrigger to define how to trigger the snippet --> | |
<tabTrigger>z</tabTrigger> | |
<!-- Optional: Set a scope to limit where the snippet will trigger --> | |
<!-- <scope>source.python</scope> --> | |
</snippet> |
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
import sublime, sublime_plugin | |
import os, re | |
def is_folder(path, action): | |
regex = re.compile(action) | |
return regex.findall(path) | |
def generate_prefix(path, folder_name): | |
if folder_name == 'controller': | |
return path.rstrip('_controller.rb').split('/controllers/')[1] + '/' |
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
[ | |
{ "keys": ["f9"], "command": "reindent"}, | |
{ "keys": ["alt+down"], "command": "paste_from_history" }, | |
{ "keys": ["shift+ctrl+g"], "command": "grep_file" }, | |
{ "keys": ["super+'"], "command": "change_quotes" }, | |
{ "keys": ["shift+super+r"], "command": "reveal_in_side_bar" } | |
] |
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
#!/usr/bin/env ruby | |
current_branch = `git symbolic-ref --short HEAD`.to_s.strip! | |
first_preproduction_sha = `git merge-base #{current_branch} preproduction` | |
first_master_sha = `git merge-base #{current_branch} master` | |
preproduction_timestamp = `git show -s --format=%ci #{first_preproduction_sha}` | |
master_timestamp = `git show -s --format=%ci #{first_master_sha}` |
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
#Model | |
@user.should have(1).error_on(:username) # Checks whether there is an error in username | |
@user.errors[:username].should include("can't be blank") # check for the error message | |
#Rendering | |
response.should render_template(:index) | |
#Redirecting | |
response.should redirect_to(movies_path) |
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
#Model | |
@user.should have(1).error_on(:username) # Checks whether there is an error in username | |
@user.errors[:username].should include("can't be blank") # check for the error message | |
#Rendering | |
response.should render_template(:index) | |
#Redirecting | |
response.should redirect_to(movies_path) |
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
#console-messages .console-group-messages .section .header::before, | |
#console-messages .properties-tree li.parent::before | |
{ | |
content: url(chrome-devtools://devtools/Images/treeRightTriangleWhite.png) !important; | |
} | |
#console-messages .console-group-messages .section.expanded .header::before, | |
#console-messages .properties-tree li.parent.expanded::before | |
{ | |
content: url(chrome-devtools://devtools/Images/treeDownTriangleWhite.png) !important; |