Skip to content

Instantly share code, notes, and snippets.

View genslein's full-sized avatar

Gabriel Enslein genslein

View GitHub Profile
@genslein
genslein / advanced_search.markdown
Created February 28, 2024 17:41 — forked from dohsimpson/advanced_search.markdown
Advanced Search Tricks

Google

  • "cocotte bag": exact match
  • "* is thicker than water": * to replace a phrase inside exact match
  • jaguar -car: minus to filter out matches
  • site:time.com google: search on site, you don't need '.', e.g. 'site:gov'
  • define:bae: check definition, even for slang
  • $0..$50: numeric range (ignore $)
  • "inbound marketing" ~professional: synonyms
  • related:nationalgeographic.com: similar sites
@genslein
genslein / chat_server.rb
Created September 13, 2023 22:40 — forked from EvanBrightside/chat_server.rb
Chat Server Ruby
require 'socket'
def welcome(chatter)
chatter.print 'Welcome! Please enter your name: '
chatter.readline.chomp
end
def broadcast(message, chatters)
chatters.each do |chatter|
chatter.puts message
@genslein
genslein / chat.rb
Created September 13, 2023 22:38 — forked from akoskovacs/chat.rb
Ruby chat server
#!/usr/bin/env ruby
# Run with
# $ chmod +x chat.rb && ./chat.rb
# or
# $ ruby chat.rb
require 'socket'
require 'thread'
@genslein
genslein / fiberchat.rb
Created September 13, 2023 22:38 — forked from pfleidi/fiberchat.rb
A naive socket chat using select() and ruby fibers
require 'rubygems'
require 'socket'
include Socket::Constants
class ChatServer
def initialize
@reading = Array.new
@writing = Array.new
@clients = Hash.new
@genslein
genslein / goal_setting.md
Created January 24, 2023 15:56
Goals and review for X time period

Goals for this year:

  • List your major goals here! Sharing your goals with your manager & co-workers is really nice because it helps them see how they can support you in accomplishing those goals!

Goals for next year

  • If it's getting towards the end of the year, maybe start writing down what you think your goals for next year might be.

Projects

@genslein
genslein / CelsiusApiExample.js
Created April 7, 2022 20:51
testing celsius
const { Celsius, AUTH_METHODS, ENVIRONMENT } = require('celsius-sdk');
const FormData = require('form-data')
const axios = require("axios");
// const partnerKey = process.env.PARTNER_TOKEN // Should be kept secret
const partnerToken = "27ad54f93337ddf5ac9b3c3df7623d05";
const bodyFormData = new FormData({
"first_name": "Jane",
"last_name": "Doe",
"middle_name": "Middle",
@genslein
genslein / current_vacuums_in_progress.sql
Created February 1, 2022 16:28
Check postgres to see status of all vacuums running and their relations
SELECT
p.pid,
now() - a.xact_start AS duration,
coalesce(wait_event_type ||'.'|| wait_event, 'f') AS waiting,
CASE
WHEN a.query ~*'^autovacuum.*to prevent wraparound' THEN 'wraparound'
WHEN a.query ~*'^vacuum' THEN 'user'
ELSE 'regular'
END AS mode,
p.datname AS database,
@genslein
genslein / main.go
Created January 5, 2022 16:47 — forked from dopey/main.go
How to generate secure random strings in golang with crypto/rand.
package main
import (
"crypto/rand"
"encoding/base64"
"fmt"
"io"
"math/big"
)
@genslein
genslein / main.go
Created January 5, 2022 16:46 — forked from denisbrodbeck/main.go
How to generate secure random strings in golang with crypto/rand.
// License: MIT
package main
import (
"crypto/rand"
"fmt"
"math/big"
)
// GenerateRandomASCIIString returns a securely generated random ASCII string.

GitHub Infrastructure Engineer Questionnaire

Thanks again for applying to the Infrastructure Engineer job at GitHub! The purpose of this gist is to get a better sense of your technical skills and overall communication style. Take as much time as you need to answer these questions.

Section 1

Engineers at GitHub communicate primarily in written form, via GitHub Issues and Pull Requests. We expect our engineers to communicate clearly and effectively; they should be able to concisely express both their ideas as well as complex technological concepts.

Please answer the following questions in as much detail as you feel comfortable with. The questions are purposefully open-ended, and we hope you take the opportunity to show us your familiarity with various technologies, tools, and techniques. Limit each answer to half a page if possible; walls of text are not required, and you'll have a chance to discuss your answers in further detail during a phone interview if we move forward in the process. Finally, feel