Skip to content

Instantly share code, notes, and snippets.

View unflores's full-sized avatar

A Flores unflores

View GitHub Profile
module Compliance
module IdentityVerification
class TestingWebhookSubdomain
def initialize(stage, env, host)
@stage = stage
@host = host
@env = env
end
def value
git st | tail --lines=+2| awk -F ' ' '{print $2}'|xargs sed -i 's/\r//g'
@unflores
unflores / Dots.js
Created February 8, 2019 14:26
Gotta get them dots!
import React from 'react'
class Dots extends React.Component {
constructor(props) {
super(props)
this.state = {
dots: '',
timerID: null,
}
}
@unflores
unflores / putty.bat
Created November 16, 2017 12:13
This is the kind of thing I forget
start "" "C:\Users\unflores\Documents\utilities\putty.exe" -load "dev"
@unflores
unflores / included.js
Created November 10, 2017 10:56
Once a singleton always a singleton
var Thing = require('./thing');
console.log('Include thing from another file');
console.log(Thing.thing, ":thing in included");
sudo mount -t vboxsf shared_dev /home/ubuntu/shared_dev/
@unflores
unflores / http connection monitor
Last active March 10, 2016 09:33
Never forget....
sudo tcpdump -A -s 0 'tcp port 80 and (((ip[2:2] - ((ip[0]&0xf)<<2)) - ((tcp[12]&0xf0)>>2)) != 0)' -i lo
@unflores
unflores / .gemrc
Created March 7, 2016 12:12 — forked from jch/.gemrc
gemrc example
# http://docs.rubygems.org/read/chapter/11
---
gem: --no-ri --no-rdoc
benchmark: false
verbose: true
update_sources: true
sources:
- http://gems.rubyforge.org/
- http://rubygems.org/
backtrace: true
@unflores
unflores / better-nodejs-require-paths.md
Created February 26, 2016 11:45 — forked from branneman/better-nodejs-require-paths.md
Better local require() paths for Node.js

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

var Article = require('../../../models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@unflores
unflores / tmux setup
Last active January 27, 2016 14:49
I always forget this. I should probably include it in my home directory w defaults for setup
#!/bin/sh
tmux new-session -d -s dev -c '/infra'
# First window already created
tmux rename-window 'docker'
# Create all other windows
tmux new-window -t dev:2 -d -c '/home/ubuntu/server' -n 'chef'
tmux new-window -t dev:3 -d -c '/home/ubuntu/server' -n 'chef-client'
tmux new-window -t dev:4 -d -c '/infra/deployment/blog_austinflores/current' -n 'blog'
tmux new-window -t dev:5 -d -n 'prod' "ssh -i /home/ubuntu/.ssh/ user@place"