Skip to content

Instantly share code, notes, and snippets.

@jmoyers
jmoyers / 1. README.md
Last active June 23, 2023 17:00
Get up and running with a terminal, vim, and c++
  • color scheme
  • terminal
  • z proj, takes you to /some/deep/directory/project
@tylerneylon
tylerneylon / rwlock.py
Last active May 2, 2024 12:46
A simple read-write lock implementation in Python.
# -*- coding: utf-8 -*-
""" rwlock.py
A class to implement read-write locks on top of the standard threading
library.
This is implemented with two mutexes (threading.Lock instances) as per this
wikipedia pseudocode:
https://en.wikipedia.org/wiki/Readers%E2%80%93writer_lock#Using_two_mutexes
@gregswift
gregswift / Puppetfile
Last active December 18, 2017 02:00
Sourcing puppet modules from yaml
require 'yaml'
mypath = File.expand_path(File.dirname(__FILE__))
# Load configuration from config.yml
conf = YAML::load_file("#{mypath}/Puppetfile.yml")
forge_conf = conf.fetch('forge', nil)
if forge_conf.nil?
forge = ""
@paragonie-scott
paragonie-scott / crypto-wrong-answers.md
Last active April 21, 2024 23:48
An Open Letter to Developers Everywhere (About Cryptography)
@beci
beci / gcc 5 on ubuntu 14.04
Created October 15, 2015 07:18
use gcc 5.x on ubuntu 14.04
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-5 g++-5
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 60 --slave /usr/bin/g++ g++ /usr/bin/g++-5
@ankurcha
ankurcha / drywall.md
Last active January 19, 2016 12:38
[ Project Drywall ] Because software needs more than just colums and beams Raw

This is an aggregation of thoghts, observations, talks, blogs, code reviews and many sleepless nights. Obviously not complete or exhaustive.

Edits/Comments welcome!

Developer Production

  • Measure success of developer experience by time to setup.
  • Same scripts for CI as for developer sandbox.
  • Each app should include the build sripts that are used to compile from scratch in a sandbox.
  • Mentality - Ask the question - Can we opensource/handoff this repo as it stands today?
  • Readme.md must be complete and contain 3 main sections
@angstwad
angstwad / dict_merge.py
Last active March 1, 2024 23:53
Recursive dictionary merge in Python
# Copyright 2016-2022 Paul Durivage
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# Antnee's Classy Filter! v3.0a
# https://www.pathofexile.com/forum/view-thread/1245785
# Instructions for use:
# Right-click this page, click "select all"
# Right click again, click "Copy"
# Open a new .txt document and paste the contents of this page into it
# USE ANSI ENCODING IF YOU USE NOTEPAD++ OR ANY OTHER TEXT EDITOR
# Click File/Save As
# Select "All Files" from the dropdown menu at the bottom
@finnigja
finnigja / dnsdiff.py
Last active July 26, 2022 02:36
Script for comparing DNS lookup results across multiple resolvers
#!/usr/bin/env python
#
# DNS Result Comparison Utility
# Author: https://twitter.com/chair6
#
import argparse
import dns.resolver
import dns.rdatatype
from collections import defaultdict
@T31337
T31337 / CapCam.py
Last active January 11, 2017 12:49
ScreenRecorder&Microphone Audio Recorder Using FFMPEG & Python
#!/usr/bin/env python3
'''
This Script Is Mainly From A Youtube User,
I Only Modified It Slightly To Make It Python3 Compatable,
And Added Custom Microphone Recording Support
Original Source Code: http://pastebin.com/BY1t5AcC
Thanks To Youtube User NoBeansJose
License: