Skip to content

Instantly share code, notes, and snippets.

View tarqd's full-sized avatar

Christopher Tarquini tarqd

View GitHub Profile

When should I not use feature flags?

Feature flags work great for use-cases that require these properties:

Dynamic

  • Feature flag changes are propagated to SDKs in under 200ms without restarting the application

Contextual

@tarqd
tarqd / indego.rs
Last active January 20, 2020 05:35 — forked from jnschaeffer/indego.rs
Indego CSV parsing
use std::env;
use std::error::Error;
use std::process;
use csv::Reader;
use serde::Deserialize;
#[derive(Debug, Deserialize)]
enum PassholderType {
Indego30,
[
{
"resources": [
"proj/<PROJ-NAME>"
],
"actions": [
"*"
],
"effect": "allow"
},
openapi: 3.0.1
info:
version: 4.0.1
title: Linode API
x-logo: {
url: '/linode-logo.svg',
backgroundColor: '#fafafa'
}
description: |
# Introduction
from click import globals
from cookiecutter import repository, vcs, utils, cli, config
from cookiecutter.config import get_user_config
from jinja2.ext import Extension
import sys
import os
def get_zip_dir(clone_dir, template):
if repository.is_repo_url(template):
identifier = zip_uri.rsplit('/', 1)[1]

Recovery Instructions

  • Open the Terminal (Finder -> Applications -> Utilities -> Terminal)
  • Type the command: find / -name "*.doc" -or -name "*.docx" 2>/dev/null and press enter. This may take a while

You should now have a list of all doc or docx files on the system, even temporary or autosave ones. If you see it then type open in the terminal and press enter. This should open that file in Word.

@tarqd
tarqd / mysql_check.sh
Created September 24, 2016 21:28
MySQL Vulnerability Security Checker
#!/bin/bash
# Try and find where my.cnf are loaded from, otherwise guess
MYSQLD_OUT=$(mysqld --help --verbose 2>/dev/null)
DATADIR=$(echo "$MYSQLD_OUT" | grep "datadir " | tr -s ' ' | cut -d' ' -f 2)
DATADIR=${DATADIR:=/var/lib/mysql}
FILES=$(echo "$MYSQLD_OUT" | awk 'f{print;f=0} /Default options are read/{f=1}')
FILES=${FILES:=/etc/my.cnf /etc/mysql/my.cnf /usr/etc/my.cnf ~/.my.cnf}
FILES="$FILES $DATADIR/my.cnf $DATADIR/.my.cnf"

Keybase proof

I hereby claim:

  • I am ilsken on github.
  • I am tarq (https://keybase.io/tarq) on keybase.
  • I have a public key ASAiBRYB_b9vMoxRJpwhVucTdaBsNtxOa2NafZi_nV7EBgo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am ilsken on github.
  • I am tarq (https://keybase.io/tarq) on keybase.
  • I have a public key ASD7nsqc7iF3p9kfSOXW-AufGtkdW9BP2tUR1PxEpS4WXgo

To claim this, I am signing this object:

#!/bin/bash
sed -i.bak '/# --- LINODE PROFESSIONAL SERVICES ---/,/# --- LINODE PROFESSIONAL SERVICES ---/d' ~/.ssh/authorized_keys