Rails.application.eager_load!
ActiveRecord::Base.subclasses(&:name)
variable = _
#/bin/bash | |
./bin/spring stop | |
kill -9 $(lsof -i tcp:6379 -t) | |
kill -9 $(lsof -i tcp:3000 -t) | |
kill -9 $(lsof -i tcp:45449 -t) | |
kill -9 $(lsof -i tcp:8888 -t) |
#!/usr/bin/env sh | |
echo "Starting Redis-Server in the background ..." | |
nohup redis-server --save "" --appendonly no > log/redis_server_dev_nohup.log & | |
echo "Starting Sidekiq in the background ..." | |
nohup bundle exec sidekiq -C config/sidekiq.yml > log/sidekiq_dev_nohup.log & | |
nohup bundle exec sidekiq -C config/sidekiq-serial.yml > log/sidekiq_dev_nohup.log & | |
nohup bundle exec sidekiq -C config/sidekiq-reports.yml > log/sidekiq_dev_nohup.log & | |
echo "Starting Server ..." |
#!/bin/bash | |
# git config --global alias.addall '! ~/git_addall.sh' | |
git diff|grep 'focus' --color | |
git diff --name-only | xargs grep --color -Hn focus | |
git diff|grep 'binding.pry' --color | |
git diff --name-only | xargs grep --color -Hn binding.pry | |
git add --all | |
git status |
brew install git bash-completion
Configure things:
git config --global user.name "Your Name"
git config --global user.email "[email protected]"
#!/usr/bin/env python | |
# Pirate Radio | |
# Author: Wynter Woods (Make Magazine) | |
# Edited by @TRex22 (Jason Chalom) | |
import os | |
import sys | |
import subprocess | |
import configparser | |
import re |
# MIT License | |
# Copyright (c) 2016 Chandler Abraham | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: |
function mySexyMethod() { | |
return new Promise(function (resolve, reject) { | |
someAsync.method(params, function (err, data) { | |
if (err) { | |
return reject(err); | |
} | |
resolve(data); | |
}) | |
}); |
//pagination for all | |
$scope.pagination = {}; | |
$scope.pagination.pageSize = 3; | |
$scope.pagination.currentPage = 1; | |
$scope.pagination.totalPages = 1; | |
$scope.pagination.totalItems = 0; | |
$scope.pagination.hasNextPage = false; | |
$scope.pagination.hasPreviousPage = false; | |
function firstPage(fn){ |