Skip to content

Instantly share code, notes, and snippets.

View trevoro's full-sized avatar

Trevor O trevoro

View GitHub Profile
@trevoro
trevoro / keybase.md
Created March 30, 2020 22:49
keybase.md

Keybase proof

I hereby claim:

  • I am trevoro on github.
  • I am trevoro (https://keybase.io/trevoro) on keybase.
  • I have a public key ASDVF96i5TVXYieL0Q3_AP-NrlD-1tNyyah0aReoKZ3BGwo

To claim this, I am signing this object:

@trevoro
trevoro / all_wordpress_multisite_plugins.sql
Last active February 2, 2019 19:55
Get all plugins for wordpress multi-site installations
DELIMITER //
DROP PROCEDURE IF EXISTS site_plugins//
CREATE PROCEDURE site_plugins()
BEGIN
DECLARE v_finished INTEGER DEFAULT 0;
DECLARE option_val varchar(256);
DECLARE name_table varchar(256);
DECLARE cur_tables CURSOR FOR SELECT TABLE_NAME from information_schema.tables where TABLE_NAME like 'wp_%_options';
DECLARE CONTINUE HANDLER FOR NOT FOUND SET v_finished = 1;
package main
import (
"fmt"
"os"
)
type config struct {
V string
## About the Role
- you're a leader not a manager
- you have no authority but more responsibility
- you must rely on a handful of skills to motivate your team; persuasion, education, and empathy.
- you implement and encourage best practices, mostly using code reviews and technical discussions
## How you'll be evaluated
- up front design conversations - frequency and quality
- availability for assistance / guidance
- proactive solutions; identify problems and propose solutions upstream to senior leadership
#!/usr/bin/env ruby
# List all network interfaces using the ifconfig tool
# Returns an array of interface names
def list_interfaces
get_interfaces.keys
end
# Get all interfaces details. Returns a hash
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAzaXPU1vx1e32yI+BoKBuMNm4xwfWsJiSq5ysa43wtvPmPRYKIu2dwl3mAEpFnJvrCLKSeks6iBUoWgwR+Yb4MhXdLoA9DjbvoNi0PLhTBMLBQ3/aw+W8tID3n4A6gHao+p2RoAU0TZ/caFBTuZVhpvztHC80qwEtEuKMQDr66yJHUhuRFWhPmT6qrdovB9XgyThuXtG/TKTEYKNUJzyCwlwXNn2T2wFc3P8DwvOlyJRRBuINLo7h/iJQEfTzZGVitFm3N4+MkEcF+m7neYCg62pB6jtRxXarD+W7TOqFzIn/ydpqcMYQ68EKmKINvh+n6GgR7kBR5UYvUCdkpfgbdQ== trevoro@Tethys.local
Server Software: nginx/1.4.1
Server Hostname: ec2-184-169-195-109.us-west-1.compute.amazonaws.com
Server Port: 80
Document Path: /
Document Length: 13398 bytes
Concurrency Level: 10
Time taken for tests: 3.732 seconds
Complete requests: 1000
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAzaXPU1vx1e32yI+BoKBuMNm4xwfWsJiSq5ysa43wtvPmPRYKIu2dwl3mAEpFnJvrCLKSeks6iBUoWgwR+Yb4MhXdLoA9DjbvoNi0PLhTBMLBQ3/aw+W8tID3n4A6gHao+p2RoAU0TZ/caFBTuZVhpvztHC80qwEtEuKMQDr66yJHUhuRFWhPmT6qrdovB9XgyThuXtG/TKTEYKNUJzyCwlwXNn2T2wFc3P8DwvOlyJRRBuINLo7h/iJQEfTzZGVitFm3N4+MkEcF+m7neYCg62pB6jtRxXarD+W7TOqFzIn/ydpqcMYQ68EKmKINvh+n6GgR7kBR5UYvUCdkpfgbdQ== trevoro@Tethys.local
def check_redis_version
conn = Hiredis::Connection.new
conn.connect('localhost', 6379)
conn.write ['info']
result = conn.read.split(/\r\n/).select {|l|
not (l =~ /^#/ or l == '')
}
k,v = result[0].split(/:/)
@trevoro
trevoro / gist:6187221
Created August 8, 2013 18:19
Services to host your website on Dropbox
http://smallvictori.es
http://site44.com
http://harp.io
http://calepin.co
http://scriptogr.am
http://backlift.com
http://pages.github.com
http://pancake.io
http://paperplane.co
http://cloudcannon.com