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
# Ensure swagger docs have been generated for your app, | |
# by weirdly running your app locally and navigating to route | |
# that matches whwere the docs are mounted | |
rails s -p 3001 | |
# Install bootprint | |
npm install -g bootprint | |
npm install -g bootprint-openapi | |
# Use Bootprint to generate docs from the default swagger docs location |
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
#Only delete branches merged into their upstream origins | |
git branch | grep -v "master" | grep -v "release" | xargs -n 1 git branch -d | |
# Delete branch regardless of merge status | |
git branch | grep -v "master" | grep -v "release" | xargs -n 1 git branch -D |
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
def bin_to_hex(s) | |
s.unpack('H*').first | |
end | |
def hex_to_bin(s) | |
s.scan(/../).map { |x| x.hex }.pack('c*') | |
end | |
#Kudos to: http://anthonylewis.com/2011/02/09/to-hex-and-back-with-ruby/ |
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
rubocop -a `git diff --name-only --cached | grep '\.rb'` |
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
sudo /usr/local/mysql/support-files/mysql.server restart |
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
git branch -D `git branch | grep 'ard_*'` |
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
$(function() { | |
$('.chosen-select').chosen({ | |
allow_single_deselect: true, | |
no_results_text: 'No results matched' | |
}); | |
}); |
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
module Patterns | |
class CredentialAdapter | |
attr_reader :config_params | |
def initialize(config_params ={}) | |
@config_params = config_params | |
end | |
def method_missing(message, *args, &block) | |
if config_params.include?(message) |
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
$( document ).ready(function() { | |
// Registration specific styling | |
$('#registration .logo').css({"text-align": "center","border-radius": "5px","background": "rgba(255,255,255,0.1)"}); | |
$('#registration').css({"border-radius": "5px"}); | |
// Login specific styling | |
$('#login').css({"background": "rgba(255,255,255,0.9)","border-top-width": "0"}); | |
}); |
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
To export: | |
mysqldump -u mysql_user -p DATABASE_NAME > backup.sql | |
To import: | |
mysql -u mysql_user -p DATABASE < backup.sql |
NewerOlder