Skip to content

Instantly share code, notes, and snippets.

Avatar

Michael Whalen whalesalad

View GitHub Profile
View ipmi_tool_fanspeed_r720.sh
brew install ipmitool
export IPMI_PASSWD="••••••••••••"
# List sensors
ipmitool \
-I lanplus \
-H thor-drac.ws.internal \
-U root \
-P $IPMI_PASSWD \
View rubocop.yml
Bundler/OrderedGems:
Enabled: false
Bundler/SymbolArray:
Enabled: false
Layout/IndentationWidth:
Enabled: false
Layout/ElseAlignment:
View ublox.ex
defmodule Rabbit.Ublox do
alias __MODULE__
use Bitwise
defstruct msg_class: nil,
msg_id: nil,
payload: []
def list_to_binary(list) do
Enum.into(list, <<>>, fn byte -> <<byte::8>> end)
View memcached_blobstore.py
import io
import json
from service.memcached import client as memcached
from service.storage import utils
ONE_MEGABYTE = 1000 * 1000
View supycache_redis.py
import pickle
import supycache
from supycache.backends.base import BaseCache
from service.persistence import Redis
class SupyCacheRedisBackend(BaseCache):
def __init__(self, conn, prefix=None, config=None):
View lyft_experiments.json
{
"assignments": {
"spl.user_overview.pilot": "control",
"IDPAXAccountRecoveryCopy": "two",
"DaxDwlTemplateDecisionIntegration": "treatment",
"dax_acq.dwl_email_first_reduced.DAXDwlEmailFirstReduced": "control",
"webclient.brochure_experiments.showRequestLyft": "treatment",
"webclient.welcome_redirect.FPRedirectDesktopWelcomeToRideLyft": "control",
"organic_growth.gift_card_footer.display_footer": "treatment",
"webclient.ride_request_flow.PGShowCreditCardModal": "treatment",
View s3_iam_maker.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import json
import copy
import itertools
base_policy = json.loads("""
{
View 🤔.erb
{
"query": "<%= params[:query] %>",
"suggestions": [
<% size = @customers.size %>
<% @customers.each_with_index do |customer, i| %>
{
"value": "<%= customer.id %>",
"data": <%= raw customer._source.to_json %>
}<%= i + 1 == size ? "" : "," %>
<% end %>
View envy.cr
require "json"
require "http/server"
server = HTTP::Server.new do |context|
environment = Hash.zip(ENV.keys, ENV.values)
context.response.content_type = "application/json"
context.response.print environment.to_json
end
View foo.py
def handle_platypus(args):
pass
def handle_dog(args):
pass
def handle_cat(args):
pass
def fallback(args):
You can’t perform that action at this time.