Skip to content

Instantly share code, notes, and snippets.

View compwron's full-sized avatar
💭
https://github.com/drop-ice/dear-github-2.0

compwron compwron

💭
https://github.com/drop-ice/dear-github-2.0
View GitHub Profile

There are three ways to get across the Bay.

Service Cost Notes
AC Transit Transbay Service $4.20/one-way or $151.20/month fastest option if you live near a bus stop; drops off at Transbay Terminal, then connect to office via bike share at station. 36 rides or 18 commute round-trips makes the monthly pass worthwhile
Bikes on BART varies bikes allowed all hours, but crowded during peak hours; swinging through Oakland stations makes this slower than AC Transit Transbay Service
MacArthur Bike Shuttle $1 cheapest option, if full take BART
SF Bay Ferry $4.75 on ClipperCard connects Jack London Square and SF Ferry Building; can take bike onboard

If you connect by bicycle, you have these options to avoid having to take the bike onto the train:

Subject: Apologies for the downtime, but we're coming back stronger.

Dear Simon,

As you may already know, BrowserStack experienced an attack on 9th November, 2014 at 23:30 GMT during which an individual was able to gain unauthorized access to some of our users’ registered email addresses. He then tried to send an email to all our registered users, but he was only able to reach less than 1% (our estimate is 5,000 users). The email contained inaccurate information, even claiming that BrowserStack would be shutting down.

When we realized this, our only concern was to protect our users. This involved temporarily taking down the service, as we scrutinized each component carefully. This inconvenienced our users for several hours, and for that we are truly sorry.

What happened?

@vitorbaptista
vitorbaptista / infinite_hangouts.sh
Created May 24, 2012 17:25
Infinite Google Hangouts
#!/bin/sh
# Change this to the button coordinates.
# To discover it, wait for it to appear, open a terminal,
# put the cursor over it and run "xdotool getmouselocation".
BUTTON_COORDINATES="300 800"
while (true)
do
xdotool mousemove $BUTTON_COORDINATES click 1 \
@acslocum
acslocum / skypecall.sh
Created April 11, 2013 17:29
Make a call from skype, over and over, on OSX
#!/bin/bash
# Tell Skype to dial a number
if [ -z "$1" ]
then
echo "usage: skypecall PHONE_NUMBER NUMBER_OF_CALLS"
exit 65
fi
counter=$2
@coderanger
coderanger / talk.md
Last active December 28, 2015 02:58
PyCon 2016 Submission

Behind Closed Doors: Managing Passwords in a Dangerous World

Description

A modern application has a lot of passwords and keys floating around. Encryptions keys, database passwords, and API credentials; often typed in to text files and forgotten. Fortunately a new wave of tools are emerging to help manage, update, and audit these secrets. Come learn how to avoid being the next TechCrunch headline.

Abstract

Secrets come in many forms, passwords, keys, tokens. All crucial for the operation of an application, but each dangerous in its own way. In the past, many of us have pasted those secrets in to a text file and moved on, but in a world of config automation and ephemeral microservices these patterns are leaving our data at greater risk than ever before.

anonymous
anonymous / gist:8034650
Created December 19, 2013 05:00
(use 'clojure.string)
(defn first-parts-are? [s test-string]
(let [cleaned-string (subs s 0 (min
(count test-string)
(count s)))]
(= test-string cleaned-string)))
(defn is-a-comment [line]
(some true? (map
(partial first-parts-are? line)
@moll
moll / migrate_sessions_to_devise_3.rb
Created September 2, 2013 21:56
Because Devise 3 (and/or Warden) changed the signature of the session info, all sessions were invalidated and thereby people logged out. You do *not* log people out unless they ask for it. Capisce? This migration migrates migraines by migrating those sessions. Replace the word "account" and "Account" if your account model isn't named Account, bu…
class MigrateSessionsToDevise3 < ActiveRecord::Migration
class Session < ActiveRecord::Base
attr_protected
serialize :data, JSON
end
def up
Session.find_each do |session|
warden = session.data["warden.user.account.key"]
next unless warden
@compwron
compwron / gist:7838187
Last active June 20, 2016 23:53
Set annotation processing to "on" when using gradle idea plugin (Intellij 12)
idea.module {
testSourceDirs += file('src/test/unit/java')
testSourceDirs += file('src/test/unit/resources')
excludeDirs += 'file://$MODULE_DIR$/src/main/webapp/node_modules'
}
idea.project {
ipr.withXml { provider ->
def node = provider.asNode()
@dudadornelles
dudadornelles / gitr
Last active December 5, 2016 23:28
gitr - run git on all subdirs that are git repos
#!/bin/bash
GREEN='\033[0;32m'
NC='\033[0m'
function git_execute_r {
for dir in `ls -l1d */.git`; do
pushd `dirname $dir` >/dev/null
printf "${GREEN} :: @ `pwd`\n${NC}"
git $@
popd >/dev/null

Diversity needs resources.

ideas are great. here are some great ideas. you however cannot implement ideas without resources, which basically means money. I am a lot less interested in ideas for a company right now that aren't backed by that company's money / staff.

a few ways to use resources:

  • do you have 2 awesome recruiters who want to do more? let them do it full time.
  • sponsor your employees to give talks about things they care about. (mentorship? good management? =D)
  • systematically reward people for doing diversity work. give them promotions or raises. let everyone know that's how it works.
  • sponsor events (like AlterConf) in your office, and give them organizational support.