(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf
:
class Api::RegistrationsController < Api::BaseController | |
respond_to :json | |
def create | |
user = User.new(params[:user]) | |
if user.save | |
render :json=> user.as_json(:auth_token=>user.authentication_token, :email=>user.email), :status=>201 | |
return | |
else |
People
![]() :bowtie: |
😄 :smile: |
😆 :laughing: |
---|---|---|
😊 :blush: |
😃 :smiley: |
:relaxed: |
😏 :smirk: |
😍 :heart_eyes: |
😘 :kissing_heart: |
😚 :kissing_closed_eyes: |
😳 :flushed: |
😌 :relieved: |
😆 :satisfied: |
😁 :grin: |
😉 :wink: |
😜 :stuck_out_tongue_winking_eye: |
😝 :stuck_out_tongue_closed_eyes: |
😀 :grinning: |
😗 :kissing: |
😙 :kissing_smiling_eyes: |
😛 :stuck_out_tongue: |
# Assuming an Ubuntu Docker image | |
$ docker run -it <image> /bin/bash |
namespace :json do | |
desc "Export all data to JSON files" | |
task :export => :environment do | |
Rails.application.eager_load! | |
ActiveRecord::Base.descendants.each do |model| | |
file = File.open(File.join(Rails.root, "db", "export", "#{model.table_name}.json"), 'w') | |
file.write model.all.to_json | |
file.close | |
end |
SET NAMES utf8; | |
SET time_zone = '+00:00'; | |
SET foreign_key_checks = 0; | |
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO'; | |
CREATE TABLE `cfop` ( | |
`id` char(4) COLLATE utf8_unicode_ci NOT NULL, | |
`descricao` varchar(200) COLLATE utf8_unicode_ci NOT NULL, | |
`aplicacao` varchar(530) COLLATE utf8_unicode_ci DEFAULT NULL, | |
PRIMARY KEY (`id`) |
In general, the command ldd and the environment variable LD_LINKER_PATH
is your best friend when running new, untested binaries in Lambda. My process (which I want to get around to automating one day, maybe using Packer), goes like this:
ldd -v ./the-binary
. Note all of the shared libraries it requires. You’ll need to remember these.console.log(require('child_process').execSync('ldd -v ./the-binary'))
This decouples a deployment from completed migrations. Give us control of the data manipulation proccess by encapsulatin it in on place. need to remember to:
You can use this diagram as a template to create your own git branching diagrams. Here's how:
https://gist.githubusercontent.com/bryanbraun/8c93e154a93a08794291df1fcdce6918/raw/bf563eb36c3623bb9e7e1faae349c5da802f9fed/template-data.xml