Skip to content

Instantly share code, notes, and snippets.

@beaukinstler
beaukinstler / create_dummy_files.py
Last active December 21, 2020 15:44
A script to create dummy files based on an existing (in this case, an MP4)
#/bin/python
# this script creates randomly sized dummy files, based on a binary type of file.
# it was used to exercise Dropbox, and see the effect of adding a removing data.
# Mostly, it was to test a third party API that was using Dropbox, and see how
# well it handled this case.
import os
import time
import pathlib
@beaukinstler
beaukinstler / terminal-cheat-sheet.txt
Last active December 10, 2019 22:36 — forked from cferdinandi/terminal-cheat-sheet.txt
Terminal Cheat Sheet
# Terminal Cheat Sheet
pwd # print working directory
ls # list files in directory
cd # change directory
~ # home directory
.. # up one directory
- # previous working directory
help # get help
-h # get help
@beaukinstler
beaukinstler / launch.json
Created June 20, 2019 15:08
vscode launch.json for python flask and pytest
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Flask",
"type": "python",
"request": "launch",
/* This code was created by Beau Kinstler
You may use it with no limitation, but it's provided with no warranty or liablilty for it's use.
Purpose: add some tools for obscuring information. If used on the client side,
this will not secure the information unless the client device has protections on it.
For instance, a kiosk where the user has no access to deve tools of a browswer.
Version notes:
bash system_profiler -detailLevel baisc | grep -A 10 "$apname"
@beaukinstler
beaukinstler / famous_quotes.json
Last active May 26, 2017 00:59
For simple quotes
[{"_id":1,"quote":"Nothing in the world is more dangerous than sincere ignorance and conscientious stupidity.","quoted":"Martin Luther King Jr"},{"_id":2,"quote":"C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg.","quoted":"Bjarne Stroustrup"},{"_id":3,"quote":"The power of accurate observation is frequently called cynicism by those who don't have it..","quoted":"George Bernard Shaw"},{"_id":4,"quote":"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former.","quoted":"Albert Einstein"},{"_id":5,"quote":"A lie gets halfway around the world before the truth has a chance to get its pants on.","quoted":"Sir Winston Churchill"},{"_id":6,"quote":"I'm living so far beyond my income that we may almost be said to be living apart.","quoted":"e e cummings"}]