Skip to content

Instantly share code, notes, and snippets.

View chumaumenze's full-sized avatar
Working from home


Working from home
View GitHub Profile
kepler62f /
Created May 21, 2020 14:29
Record audio stream from a microphone to wav files (with overlaps) using pyaudio
from datetime import datetime
import pyaudio
import wave
class MicRecorder():
A recorder class for recording audio stream from a microphone to WAV files.
Uses non-blocking callback threads to get audio stream but uses a list
to save chunks of stream to file
miguelgrinberg / .vimrc
Last active June 13, 2024 04:28
My .vimrc configuration for working in Python with vim
" plugins
let need_to_install_plugins = 0
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
let need_to_install_plugins = 1
call plug#begin()
Plug 'tpope/vim-sensible'
apfelchips / defaults.duti
Last active December 23, 2023 03:53
set file-associations on macOS: ~ 🥖.config 🥖duti 🥖defaults.duti
# duti settings file
# src:
# mkdir -p "${XDG_CONFIG_HOME:-$HOME/.config}/duti/" && curl -L "" -o "${XDG_CONFIG_HOME:-$HOME/.config}/duti/default.duti"
# duti-apply wrapper: alias duti-apply='duti -v "${XDG_CONFIG_HOME:-$HOME/.config}/duti"'
## duti documentation
## see also:
# List of MIME Types:
yish91 / changestreamwatcher.go
Created February 6, 2020 12:34
Change Stream Watcher in Go
package main
import (
JakubOboza / private-docker-regs-with-free-tiers.markdown
Created May 30, 2019 07:15
Private Docker registry with free tiers for Developers.

List of sites with free tier limits

  • Docker Hub - One private repo/image spot for free
  • Three Scale - Very generous free tier 50GB of space, 500 Pulls a month etc..
  • Canister - 20 private repos with almost no limits on free tier
  • Code Fresh - Free tier for developers

Setup your own private registry

linux-china / envoy-schema.json
Last active June 1, 2022 23:13
Envoy configuration json schema for Json and Yaml
"$schema": "",
"title": "Envoy Proxy config schema",
"description": "JSON Schema for Envoy Proxy config",
"type": "object",
"properties": {
"admin": {
"type": "object",
"description": "Configuration for the local administration HTTP server",
"properties": {
rkennesson / vmware.txt
Last active June 12, 2024 18:40
VMWare - hide the fact that you are running in a VM
# | smbios.reflecthost - Google Search
# | How to install an HP branded Windows OS as a virtual server | BITCON - IT consultants
# | This system is not supported platform |VMware Communities
# | How to edit BIOS information for a virtual machine in VMWare? - Super User
# | How to spoof real Mac in VMware - Multi-booting and Virtualisation - InsanelyMac Forum
Method 1: edit VMX file for the specific VM
#add this line
SMBIOS.reflectHost = TRUE
bradmontgomery /
Created February 15, 2016 22:54
simple examples of a context manager in python
Simple example of building your own context manager.
- PEP 343 -- the "with" statement:
tliron /
Last active January 8, 2022 13:34
Simple and functional REST server for Python (2.7) using no dependencies beyond the Python standard library.
#!/usr/bin/env python
Simple and functional REST server for Python (2.7) using no dependencies beyond the Python standard library.
* Map URI patterns using regular expressions
* Map any/all the HTTP VERBS (GET, PUT, DELETE, POST)
* All responses and payloads are converted to/from JSON for you
joepie91 /
Last active June 18, 2024 07:25
Don't use VPN services.

Don't use VPN services.

No, seriously, don't. You're probably reading this because you've asked what VPN service to use, and this is the answer.

Note: The content in this post does not apply to using VPN for their intended purpose; that is, as a virtual private (internal) network. It only applies to using it as a glorified proxy, which is what every third-party "VPN provider" does.

  • A Russian translation of this article can be found here, contributed by Timur Demin.
  • A Turkish translation can be found here, contributed by agyild.
  • There's also this article about VPN services, which is honestly better written (and has more cat pictures!) than my article.