Install: https://github.com/rubyide/vscode-ruby
{
"ruby.lint": {
"rubocop": {
"executePath": "$GEM_HOME/bin" # Or replace with the result of: `echo "$(rvm gemdir)/bin"`
},
"ruby": true
},
## RENAME FIELDS | |
Model.collection.find({}).update({ '$rename' => { 'old' => 'new' } }, multi: true, safe: true) |
<transportConnectors> | |
<transportConnector name="openwire" uri="tcp://0.0.0.0:61616"/> | |
<transportConnector name="stomp" uri="stomp://localhost:61613"/> | |
</transportConnectors> |
chars = ('a'..'z').to_a + (0..9).to_a | |
chars.shuffle.sample(4).join |
git status --porcelain | grep -E '^( |\?)(M|\?).*.rb' | cut -c4- | xargs rubocop -a |
Install: https://github.com/rubyide/vscode-ruby
{
"ruby.lint": {
"rubocop": {
"executePath": "$GEM_HOME/bin" # Or replace with the result of: `echo "$(rvm gemdir)/bin"`
},
"ruby": true
},
function cd { | |
builtin cd "$@" | |
if [ -d ".venv" ] ; then | |
source .venv/bin/activate | |
fi | |
} |
git branch -a --no-merged | grep remotes/origin | grep -v master | grep -v development | xargs git show -s --pretty=format:"%ai %d %an" |
class Movement { | |
String get status => 'COMPLETED'; | |
bool get isForeignCurrency => false; | |
} | |
class Deposit extends Movement {} | |
class Charge extends Movement { | |
String status; |
from sqlalchemy.dialects import postgresql | |
print(statement.compile(dialect=postgresql.dialect())) |
from sqlalchemy.dialects import postgresql | |
print(statement.compile(dialect=postgresql.dialect())) | |
from sqlalchemy.engine.default import DefaultDialect | |
from sqlalchemy.sql.sqltypes import String, DateTime, NullType | |
# python2/3 compatible. | |
PY3 = str is not bytes | |
text = str if PY3 else unicode | |
int_type = int if PY3 else (int, long) |