Skip to content

Instantly share code, notes, and snippets.

View sideshowcoder's full-sized avatar
💭
🐱

Philipp Fehre sideshowcoder

💭
🐱
View GitHub Profile
@markddavidoff
markddavidoff / slack-pagerduty-oncall.py
Last active April 19, 2024 02:41
Updates a Slack User Group with People that are on call in PagerDuty (updated for pagerduty v2 api and pull from env vars instead of KMS). Based on:https://gist.github.com/devdazed/473ab227c323fb01838f
"""
Lambda Func to update slack usergroup based on pagerduty rotation
From: https://gist.github.com/devdazed/473ab227c323fb01838f
NOTE: If you get a permission denied while setting the usergroup it is because there’s a workspace preference in slack
that limits who can manage user groups. At the time of writing it was restricted to owners and admins so i had to get
an owner to install the app. First i added them as a collaborator and then had them re-install the app, and got the new
auth token and added that to param store.
@timvisee
timvisee / falsehoods-programming-time-list.md
Last active April 26, 2024 04:52
Falsehoods programmers believe about time, in a single list

Falsehoods programmers believe about time

This is a compiled list of falsehoods programmers tend to believe about working with time.

Don't re-invent a date time library yourself. If you think you understand everything about time, you're probably doing it wrong.

Falsehoods

  • There are always 24 hours in a day.
  • February is always 28 days long.
  • Any 24-hour period will always begin and end in the same day (or week, or month).
@rkaramandi
rkaramandi / install-kubernetes-flannel-centos7.md
Last active April 6, 2024 05:23
Installing Kubernetes with the Flannel Network Plugin on CentOS 7

Install Prerequisites on ALL (Worker and Master) Nodes

Let's remove any old versions of Docker if they exist:

sudo yum remove docker \
                  docker-common \
                  docker-selinux \
                  docker-engine
@antirez
antirez / lmdb.tcl
Created April 28, 2017 15:40
LMDB -- First version of Redis written in Tcl
# LVDB - LLOOGG Memory DB
# Copyriht (C) 2009 Salvatore Sanfilippo <antirez@gmail.com>
# All Rights Reserved
# TODO
# - cron with cleanup of timedout clients, automatic dump
# - the dump should use array startsearch to write it line by line
# and may just use gets to read element by element and load the whole state.
# - 'help','stopserver','saveandstopserver','save','load','reset','keys' commands.
# - ttl with milliseconds resolution 'ttl a 1000'. Check ttl in dump!
@JoshCheek
JoshCheek / minesweeper.rb
Last active November 15, 2021 20:12
Mine Sweeper
# vid @ https://twitter.com/josh_cheek/status/835884161047080960
# and @ https://vimeo.com/205773556
require 'graphics'
class MineSweeper
class Cell
def initialize(mine:, clicked:, marked:, x:, y:, count:)
@x, @y, @mine, @clicked, @marked, @count =
x, y, mine, clicked, marked, count
end
@seansawyer
seansawyer / vim-eclim-scala.md
Last active May 26, 2021 02:58
Vim + Eclim for Scala development

Vim + Eclim + Scala

WARNING! Do not install anything from update sites before installing Eclim! This is because Eclim determines available project natures (android, scala, etc) by trying to discover them at install time. If they are installed on a per-user basis, it won't find them. If you're installing Eclim for use with an existing Eclipse install

You're also better off not to install any plugins via your package manager. Eclim will give you the option to install plugins associated with each project nature from its install wizard.

Install Eclipse Luna. On Arch Linux, it's available in extra.

pacman -Sy eclipse

# Hello, and welcome to makefile basics.
#
# You will learn why `make` is so great, and why, despite its "weird" syntax,
# it is actually a highly expressive, efficient, and powerful way to build
# programs.
#
# Once you're done here, go to
# http://www.gnu.org/software/make/manual/make.html
# to learn SOOOO much more.
@staltz
staltz / introrx.md
Last active April 25, 2024 04:18
The introduction to Reactive Programming you've been missing
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active April 20, 2024 16:52
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@jbtule
jbtule / build.fsx
Last active March 24, 2020 16:06
Crossplatform FSharp Makefile Bootstrapper
#!/bin/sh
#if run_with_bin_sh
# Doing this because arguments can't be used with /usr/bin/env on linux, just mac
exec fsharpi --define:mono_posix --exec $0 $*
#endif
(*
* Crossplatform FSharp Makefile Bootstrapper
* Apache licensed - Copyright 2014 Jay Tuley <jay+code@tuley.name>
* v 2.0 https://gist.github.com/jbtule/9243729