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

{
"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 / 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 / autossh init.d
Created May 2, 2012 06:06 — forked from atr000/autossh init.d
launches and maintains uniquely named autossh tunnels alive
#! /bin/sh
#
# Author: Andreas Olsson <[email protected]>
# Version: @(#)autossh_tunnel.foo 0.1 27-Aug-2008 [email protected]
#
# For each tunnel; make a uniquely named copy of this template.
## SETTINGS
#
@apsoto
apsoto / gist:1503758
Created December 20, 2011 23:18 — forked from jtimberman/gist:1040853
Ohai plugin to return semantic reference attributes for network addresses
require 'rubygems'
require 'ohai'
o = Ohai::System.new()
o.all_plugins
# And retrieve some useful semantic reference attributes for network interfaces
o['network']['interfaces'].each do |iface, addrs|
addrs['addresses'].each do |ip, params|
@apsoto
apsoto / ebs_raid.rb
Created November 11, 2011 05:25 — forked from tnine/ebs_raid.rb
Ebs raid mounting. Links to this jira issue http://tickets.opscode.com/browse/CHEF-2275
include Opscode::Aws::Ec2
#Auto locates and attached ebs devices based on the data bag they reside in. The following test cases need to be performed
# Create multiple resources with new node: PASS
#
# Re-attach multiple resources after a reboot: PASS
#
# Create resources across 2 runs. First run creates first raid set, second run re-attaches then creates: PASS
#
@apsoto
apsoto / links.textile
Created November 5, 2011 02:23 — forked from lucashungaro/links.textile
Links de referência utilizados em minha palestra