Skip to content

Instantly share code, notes, and snippets.

@woochica
woochica / feedback_rubric.csv
Created December 5, 2023 13:34
Engineering feedback rubric
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 6.
Aspect/Level,Level A,Level B,Level C
Design/UX,Implements input from design/UX in a consistent way.,Collaborates with design/UX to identify and fix UI/UX issues.,Proactively surfaces UI/UX issues and proposes solutions.
Testing,Does manual testing,Knows when to choose manual or automated testing. Writes automated tests according to task.,Proactively writes automated tests on the approriate level to increase code coverage.
Monitoring,Doesn't use system logs,Navigates system logs to track down issues,Proactively monitors system health
Programming/Architect,Comfortable navigates the codebase. Writes clean code. Follows team and industry best practices,Proposes and implements systematic changes to the code to improve its maintainability and scalability.,"Proposes and implements subsystems that have significant, positive impact on the life of the fellow engineers or the business."
Workflow,Resolves feedback recieved on their PR,Reviews peer PRs and makes sure to understand them,"Makes suggestions, provides actiona
@woochica
woochica / emacsclient.sh
Created April 11, 2023 14:36
Open file in new Emacs window (supports FILE:LINE:COL schema)
#!/usr/bin/env bash
if [ -z "$1" ] ; then
echo "Open file in Emacs (create new frame)."
echo "Usage: $0 filename"
exit 1
fi
FILE=$(echo $1 | cut -d : -f 1)
POS=$(echo $1 | cut -d : -f 2-)
@woochica
woochica / yt2mp3_playlist.sh
Last active October 4, 2023 20:46
Download songs using youtube-dl
#!/bin/bash
# Download songs from YouTube
target_dir=18
yt2mp3="youtube-dl -x --audio-format mp3"
playlist=(
"Budepesmód Akkezdet Phiai"
"Bang Bang Rock Steady Tomorrow's Children"
"Spying Glass Horace Andy"
@woochica
woochica / management_command.py
Last active February 9, 2022 20:07
Add logging to Django management commands
import logging
from django.core.management.base import BaseCommand
VERBOSITY_ERROR = 0
VERBOSITY_WARNING = 1
VERBOSITY_NOTICE = 2
VERBOSITY_SUCCESS = 3
LEVEL_ERROR = "error"
@woochica
woochica / hello.rs
Last active November 22, 2021 16:19
Hello package.elm-lang.org
//! Another simple example that creates a custom HTTP client instance and sends
//! a GET request with it instead of using the default client.
use isahc::{prelude::*, HttpClient};
use std::{
io::{copy, stdout},
};
fn main() -> Result<(), isahc::Error> {
let url = format!("https://package.elm-lang.org/all-packages/since/{}", 0);
@woochica
woochica / yt2mp3.bat
Last active February 6, 2023 11:37
Download youtube video as mp3 on Windows (with youtube-dl and ffmpeg)
@echo off
title "youtube to mp3"
set video=%1
set ffmpegbin=C:\Programs\ffmpeg\bin\ffmpeg
youtube-dl -x --audio-format mp3 --ffmpeg-location %ffmpegbin% %video%
@woochica
woochica / dir-locals.el
Created May 16, 2020 16:00
Emacs configuration for a Python project in OSX
;;; Directory Local Variables
;;; For more information see (info "(emacs) Directory Variables")
((python-mode .
((python-shell-virtualenv-root . "~/Library/Caches/pypoetry/virtualenvs")
(pyvenv-default-virtual-env-name . "~/Library/Caches/pypoetry/virtualenvs/bps-web-iZn3jUlQ-py3.8")
(pyvenv-workon . "bps-web-iZn3jUlQ-py3.8")
(python-shell-exec-path . ("/Users/apple/Dev/bps_web"))
(python-shell-extra-pythonpaths . ("/Users/apple/Dev/bps_web"))
;; Setting PYTHONPATH is needed otherwise Flycheck doesn't work properly
@woochica
woochica / flatten.js
Last active August 10, 2018 12:09
CodeWards "Consonant please" kata
function flatten(arr) {
const len = arr.length;
for (let i = 0; i < len; i++) {
arr.push(...arr.shift());
}
return arr;
}
@woochica
woochica / json_test.py
Created June 1, 2011 14:35
Testing JSON parsing speed
from __future__ import with_statement
import simplejson as json
import time
class Timer(object):
def __enter__(self):
self.__start = time.time()
def __exit__(self, type, value, traceback):