Skip to content

Instantly share code, notes, and snippets.

View apsoto's full-sized avatar

Alex Soto apsoto

  • San Francisco, CA
View GitHub Profile
@apsoto
apsoto / gitflow-breakdown.md
Created August 21, 2020 19:06 — forked from JamesMGreene/gitflow-breakdown.md
A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

Keybase proof

I hereby claim:

  • I am apsoto on github.
  • I am apsoto (https://keybase.io/apsoto) on keybase.
  • I have a public key ASAwic7CwBr93NDrb5LFx7cAJH0HpCcwzFIEzMmGIBalVgo

To claim this, I am signing this object:

{
"IAB1": "Arts & Entertainment",
"IAB1-1": "Books & Literature",
"IAB1-2": "Celebrity Fan/Gossip",
"IAB1-3": "Fine Art",
"IAB1-4": "Humor",
"IAB1-5": "Movies",
"IAB1-6": "Music",
"IAB1-7": "Television",
"IAB2": "Automotive",
@apsoto
apsoto / ssl_socket.rb
Last active December 25, 2015 01:49 — forked from claudijd/example5.rb
SSL wrapped socket connection in ruby. NOTE: * default is to NOT verify the certs (ssl_context.verify_mode => nil) * Default is also to have an empty cert store (ssl_context.cert_store => nil) This gist fixes that
>> require 'socket'
=> true
>> require 'openssl'
=> true
>>
?> ssl_context = OpenSSL::SSL::SSLContext.new
=> #<OpenSSL::SSL::SSLContext:0x007ffc9a9deb00>
>> ssl_context.verify_mode = OpenSSL::SSL::VERIFY_PEER
=> 1
>> cert_store = OpenSSL::X509::Store.new

In Rails 3

If you add a dir directly under app/

Do nothing. All files in this dir are eager loaded in production and lazy loaded in development by default.

If you add a dir under app/something/

(e.g. app/models/concerns/, app/models/products/)

@apsoto
apsoto / bundle_no_ref.json
Created July 26, 2013 00:27
JSON sample validation
{
"$schema" : "http://json-schema.org/draft-04/schema#",
"type" : "object",
"properties" : {
"class" : {
"type" : "array",
"items" : {
"type" : "integer"
}
}
@apsoto
apsoto / gist:5726877
Last active December 18, 2015 04:39 — forked from davist11/gist:1204569
Propane/Campfire sounds: /play ITEM
56k: "https://123.campfirenow.com/images/56k.gif"
bell: ":bell:"
bezos: ":laughing::thought_balloon:"
bueller: "anyone?"
clowntown: "https://123.campfirenow.com/images/clowntown.gif"
crickets: "hears crickets chirping"
dangerzone: "https://123.campfirenow.com/images/dangerzone.png"
danielsan: ":fireworks: :trophy: :fireworks:"
deeper: "https://123.campfirenow.com/images/top.gif"
drama: "https://123.campfirenow.com/images/drama.jpg"
@apsoto
apsoto / series.json
Last active December 15, 2015 19:59
backbone.siren actions examples
{
"class": [
"series"
],
"properties": {
"id": 14,
"description": "GUNS & EXPLOSIVES",
"channelsRank": 0,
"pubDate": "2013-03-20T17:13:07Z",
@apsoto
apsoto / gist:5051014
Created February 27, 2013 19:42
chef-client run fail after rvm installed system wide via chef-rvm
/opt/chef/embedded/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:247:in `to_specs': Could not find chef (>= 0) amongst [bundler-1.2.4, foreman-0.61.0, rake-10.0.3, rubygems-bundler-1.1.0, rvm-1.11.3.6, thor-0.17.0] (Gem::LoadError)
from /opt/chef/embedded/lib/ruby/site_ruby/1.9.1/rubygems/dependency.rb:256:in `to_spec'
from /opt/chef/embedded/lib/ruby/site_ruby/1.9.1/rubygems.rb:1231:in `gem'
from /usr/bin/chef-client:22:in `<main>'