This file contains 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 GenericJob | |
include Sidekiq::Job | |
def perform(klass, id, undelayed_method, *args) | |
object = klass.constantize.find(id) | |
object.send(undelayed_method, *args) | |
end | |
end |
This file contains 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
[ | |
["f", "Show next/latest diffs", "setProposedDiffBounds()"], | |
[null, "Next unreviewed file", "nextUnreviewedFile()"], | |
[null, "Previous unreviewed file", "prevUnreviewedFile()"], | |
["n", "Next personally unreviewed file", "nextPersonallyUnreviewedFile()"], | |
["p", "Previous personally unreviewed file", "prevPersonallyUnreviewedFile()"], | |
[null, "Next changed file", "nextChangedFile()"], | |
[null, "Previous changed file", "prevChangedFile()"], | |
[null, "Next visible file", "nextVisibleFile()"], |
This file contains 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
# ActiveRecord::Base.logger.level = 1 | |
# IRB.conf[:ECHO] = false | |
# Overriding Object class | |
class Object | |
# Easily print methods local to an object's class | |
def lm | |
(methods - Object.instance_methods).sort | |
end |
This file contains 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
Name: VSCode Ruby | |
Id: wingrunr21.vscode-ruby | |
Description: Syntax highlighing, snippet, and language configuration support for Ruby | |
Version: 0.26.0 | |
Publisher: Stafford Brunk | |
VS Marketplace Link: https://marketplace.visualstudio.com/items?itemName=wingrunr21.vscode-ruby | |
Name: Beautify | |
Id: hookyqr.beautify | |
Description: Beautify code in place for VS Code |
This file contains 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
#!/bin/bash | |
sudo apt-get update | |
# To make sure we have everything necessary for Webpacker support in Rails, we're first going to start by adding the Node.js and Yarn repositories to our system before installing them. | |
sudo apt-get install curl | |
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash - | |
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - | |
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list | |
sudo apt-get update |
This file contains 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
#!/bin/bash | |
array=( 15354 15359 ) | |
for i in "${array[@]}" | |
do | |
# do whatever on $i | |
echo "-------------------" | |
PULL_ID=$i | |
cwd=$(pwd) | |
TOKEN="YOUR_GITHUB_TOKEN" | |
curl -H "Authorization: token $TOKEN" -H "Accept: application/vnd.github.v3.patch" https://api.github.com/repos/amuratech/crm/pulls/$PULL_ID | git am |
This file contains 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
namespace :release do | |
desc "get current commit in remote server" | |
task :before do | |
begin | |
remote_sha = capture("cd #{current_path}; git rev-parse --verify HEAD") | |
set :remote_before_commit, remote_sha.strip | |
# first time deploy can throw exception | |
rescue | |
end | |
end |
This file contains 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
# This script verifies if a list of "undesired" words are presented in the files you are intended to commit such console | |
# output, debugging information or keys/tokens/passwords | |
# Based on the git hook created by Mark Story | |
# http://mark-story.com/posts/view/using-git-commit-hooks-to-prevent-stupid-mistakes | |
# Instructions: | |
# Put this file into your .git/hooks folder and set as executable (chmod +x pre-commit) | |
# If you want to skip the hook just add the --no-verify: git commit --no-verify |