Skip to content

Instantly share code, notes, and snippets.

View sgerrand's full-sized avatar
🧑‍✈️
Manual controls

Sasha Gerrand sgerrand

🧑‍✈️
Manual controls
View GitHub Profile
@sgerrand
sgerrand / import_sat_via_Zendesk_API.js
Created January 20, 2023 15:05 — forked from sbkinney/import_sat_via_Zendesk_API.js
This is a method for pulling Zendesk data from a view via the API into a Google Docs spreadsheet
/* This function runs when the spreadsheet is opened and populates a menu option
labelled Zendesk that contains two options (7 days and 30 days) which are tied
to the listed functions
*/
function onOpen() {
var sheet = SpreadsheetApp.getActiveSpreadsheet();
var entries = [{
name : "Pull Satisfaction Data (last 7 days, rolling)",
functionName : "getSatisfactionDataLast7"
@sgerrand
sgerrand / README.MD
Created June 1, 2022 10:41 — forked from lmarkus/README.MD
Extracting / Exporting custom emoji from Slack

Extracting Emoji From Slack!

Slack doesn't provide an easy way to extract custom emoji from a team. (Especially teams with thousands of custom emoji) This Gist walks you through a relatively simple approach to get your emoji out.

If you're an admin of your own team, you can get the list of emoji directly using this API: https://api.slack.com/methods/emoji.list. Once you have it, skip to Step 3

HOWEVER! This gist is intended for people who don't have admin access, nor access tokens for using that list.

Follow along...

@sgerrand
sgerrand / programming-as-theory-building.md
Created April 1, 2022 15:44 — forked from onlurking/programming-as-theory-building.md
Programming as Theory Building - Peter Naur

Programming as Theory Building

Peter Naur

Peter Naur's classic 1985 essay "Programming as Theory Building" argues that a program is not its source code. A program is a shared mental construct (he uses the word theory) that lives in the minds of the people who work on it. If you lose the people, you lose the program. The code is merely a written representation of the program, and it's lossy, so you can't reconstruct

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

@sgerrand
sgerrand / INSTALL.md
Created February 24, 2014 01:02 — forked from namuol/INSTALL.md

rage-quit support for bash

HOW TO INSTALL

Put flip somewhere in your $PATH and chmod a+x it.

Copy fuck into ~/.bashrc.

@sgerrand
sgerrand / summary
Created August 20, 2013 06:29 — forked from phaedryx/summary
Original text here: http://www.heartmindcode.com/blog/2013/08/loyalty-and-layoffs/
#!/usr/bin/env ruby
gem "parser", "~> 1.4"
require "parser"
require "parser/ruby19"
require "set"
class ConstantDeclarationAndUseProcessor < Parser::AST::Processor
attr_reader :declared, :used
def initialize
@sgerrand
sgerrand / bootstrap.sh
Last active December 18, 2015 10:58 — forked from 3kwa/bootstrap.sh
curl -O https://raw.github.com/pypa/pip/master/contrib/get-pip.py
echo -e "Installing pip..."
sudo python get-pip.py
rm get-pip.py
echo -e "Done."
echo -e "Installing Python packages..."
sudo pip install pytest
sudo pip install selenium
  1. Your class can be no longer than 100 lines of code.
  2. Your methods can be no longer than five lines of code.
  3. You can pass no more than four parameters and you can’t just make it one big hash.
  4. When a call comes into your Rails controller, you can only instantiate one object to do whatever it is that needs to be done.

You can break these rules if you can talk your pair into agreeing with you.