Skip to content

Instantly share code, notes, and snippets.

View theddaywork's full-sized avatar
🏠
Working from home

David theddaywork

🏠
Working from home
View GitHub Profile
@aaltat
aaltat / py_finder.py
Last active March 2, 2020 00:03
Find files which are not Python 3 compatible
import argparse
import subprocess
from pathlib import Path
def find_files(src_root: Path, python3: Path):
not_py3_compatible = []
for file in src_root.rglob('*.py'):
print(file.resolve())
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active April 10, 2024 20:23
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@fnky
fnky / ANSI.md
Last active May 2, 2024 07:28
ANSI Escape Codes

ANSI Escape Sequences

Standard escape codes are prefixed with Escape:

  • Ctrl-Key: ^[
  • Octal: \033
  • Unicode: \u001b
  • Hexadecimal: \x1B
  • Decimal: 27
@4k1
4k1 / sessionid_entropy.md
Last active April 6, 2023 22:53
WebAssessment: How to calculate accurate entropy of the session ID

How to calculate accurate entropy of the session ID

1. What is an entropy?

Claude Shannon says:

The entropy is a statistical parameter which measures in a certain sense, how much information is produced on the average for each letter of a text in the language. If the language is translated into binary digits (0 or 1) in the most efficient way, the entropy H is the average number of binary digits required per letter of the original language.

-- NIST Special Publication 800-63-1 - Appendix A: Estimating Password Entropy and Strength

2. Why you need to know the accurate entropy?

@emadehsan
emadehsan / Screen Unix Cheat Sheet.md
Created April 18, 2018 11:52
Screen Linux/Unix command cheat sheet

Install Screen

$ sudo apt install screen

Enter a new Screen Session

$ screen

Detach from current screen session

@seanjensengrey
seanjensengrey / octal_x86.txt
Created April 1, 2018 16:28
x86 is an octal machine
# source:http://reocities.com/SiliconValley/heights/7052/opcode.txt
From: mark@omnifest.uwm.edu (Mark Hopkins)
Newsgroups: alt.lang.asm
Subject: A Summary of the 80486 Opcodes and Instructions
(1) The 80x86 is an Octal Machine
This is a follow-up and revision of an article posted in alt.lang.asm on
7-5-92 concerning the 80x86 instruction encoding.
The only proper way to understand 80x86 coding is to realize that ALL 80x86
@metacritical
metacritical / racket-clojure-rant.md
Last active September 2, 2022 00:43
Racket-Lisp-Scheme-Clojure Rant and Answers.

Two gentlemen and their rant on languages.

Rant

  • Racket & scheme are orders of magnitude faster than clojure.
  • I like lisp but I hate this clojure movement. Especially when 60% of it is written in Java.
  • Are there major java libraries for which there is no scheme implementations?
  • Why did people pick up clojure rather than racket. Hype?
<!DOCTYPE html>
<html>
<head><title>SOUND</title></head>
<body>
<div>Frequence: <span id="frequency"></span></div>
<script type="text/javascript">
var audioCtx = new (window.AudioContext || window.webkitAudioContext)();
var oscillatorNode = audioCtx.createOscillator();
var gainNode = audioCtx.createGain();
@chunter
chunter / pageant-autoload-keys-at-startup.txt
Created June 20, 2017 10:51
Make Pageant autoload keys at startup
To make Pageant automatically run and load keys at startup:
- Find the location of pageant.exe
- Windows key + R to open the 'run' dialog box
- Type: 'shell:startup' in the dialog box
- Create a shortcut to the pageant.exe and put into this startup folder.
@csswizardry
csswizardry / README.md
Last active April 2, 2024 20:17
Vim without NERD tree or CtrlP

Vim without NERD tree or CtrlP

I used to use NERD tree for quite a while, then switched to CtrlP for something a little more lightweight. My setup now includes zero file browser or tree view, and instead uses native Vim fuzzy search and auto-directory switching.

Fuzzy Search

There is a super sweet feature in Vim whereby you can fuzzy find your files using **/*, e.g.:

:vs **/*<partial file name><Tab>