Skip to content

Instantly share code, notes, and snippets.

View eykd's full-sized avatar

David Eyk eykd

View GitHub Profile
### Keybase proof
I hereby claim:
* I am eykd on github.
* I am eykd (https://keybase.io/eykd) on keybase.
* I have a public key ASCtPxBeTQqK-TZwsV225mEtCNQO1VwTa01NGBf2aS8XoAo
To claim this, I am signing this object:
$ echo 'hello world' >> /mnt/repo/helloworld.txt
$ cat /mnt/repo/helloworld.txt
$ echo 'hello world' >> /mnt/repo/helloworld.txt
$ cat /mnt/repo/helloworld.txt
hello world
$ cat /mnt/repo/helloworld.txt
hello world
$ cat /mnt/repo/helloworld.txt
hello world
$ echo 'hello world' >> /mnt/repo/test.txt
@eykd
eykd / comp_scope_bug.py
Created October 11, 2016 21:36
Demonstrating what appears to be a scoping bug in Python 3.5.1
from __future__ import print_function
foo = 'bar'
# This works
[foo for _ in range(5)]
# This also works:
class Foo:
import logging
import random
logger = logging.getLogger('mylib.query')
def query_predicates(query, predicates):
matches = []
qkeys = set()
for rkey, predicate in predicates:
@eykd
eykd / .gitignore
Last active April 6, 2016 19:01
Demonstrating a bug in salt: user.present state removes all group membership if no groups argument provided
.vagrant
@eykd
eykd / .gitignore
Last active February 19, 2016 17:36
Demonstrating a potential bug in git.latest
.vagrant
@eykd
eykd / .gitignore
Last active December 13, 2017 00:19
Demonstrating weird behavior in git.latest
.vagrant
@eykd
eykd / Vagrantfile
Last active December 8, 2015 16:45
Demonstrating an unintentional recursive requisite when two states have the same `name`.
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define :web do |web|
# All Vagrant configuration is done here. The most common configuration
# options are documented and commented below. For a complete reference,
@eykd
eykd / pycon_2014.md
Last active August 29, 2015 13:59
PyCon 2014 notes

Friday, April 11

DNS

  • Lynn Root
  • roguelynn.com
  • roguelynn-spy.herokuapp.com

Use scapy python library for sniffing network traffic. Chrome does one DNS request for each autocomplete guess. Interesting.

@eykd
eykd / string_transformation.feature
Last active August 29, 2015 13:57
String compression interview question.
Feature: String Transformation Puzzles
In order to get a job,
As an interviewee,
I need to be able to implement stupid, meaningless string transformations.
Scenario: Compress consecutive characters to a number and the character itself.
Write a function that takes in a char *string and converts series of
consecutive identical characters to the number of consecutive characters and
the character itself.