Skip to content

Instantly share code, notes, and snippets.

View netj's full-sized avatar

Jaeho Shin netj

View GitHub Profile
@netj
netj / Enby Code R.css
Created March 11, 2019 08:22
a Blink Shell Font
@font-face {
font-family: "Envy Code R";
font-style: normal;
font-weight: normal;
src: url(data:font/opentype;charset-utf-8;base64,T1RUTwALAIAAAwAwQ0ZGIEFt83wAABB4AAHV7UZGVE1cbC2QAAHwwAAAABxHREVGArsABAAB5mgAAAAgT1MvMuc/K8kAAAEgAAAAYGNtYXBAlmy5AAAIoAAAB7ZoZWFk/f3CSgAAALwAAAA2aGhlYQvHBLUAAAD0AAAAJGhtdHj133xSAAHmiAAACjhtYXhwAo5QAAAAARgAAAAGbmFtZcZfgEgAAAGAAAAHIHBvc3T/NgBnAAAQWAAAACAAAQAAAAAUOTjh3h1fDzz1AAsIAAAAAADNQbHgAAAAAM1BseD/xP1OBJgIBgAAAAgAAgAAAAAAAAABAAAHaP4mAAAETP/E/7QEmAABAAAAAAAAAAAAAAAAAAACjgAAUAACjgAAAAMETAGQAAUAAADNAM0AAAEfAM0AzQAAAR8AZgIACAQCAAUJAAAAAgAEoAAAr0AAePsAAAAAAAAAAEVOVlkAQAAg+wYFjv4mAAAHaAHaIAAAk83UAAAEUgWOACAAIAABAAAAHgFuAAEAAAAAAAAASgCWAAEAAAAAAAEAGQEVAAEAAAAAAAIABwE/AAEAAAAAAAMAKgGdAAEAAAAAAAQAGQH8AAEAAAAAAAUADQIyAAEAAAAAAAYAFQJsAAEAAAAAAAcAOAL0AAEAAAAAAAgAGQNhAAEAAAAAAAkADAOVAAEAAAAAAAoASgQ4AAEAAAAAAAsAGQS3AAEAAAAAAAwAFgT/AAEAAAAAABAAGQVKAAEAAAAAABIAGQWYAAMAAQQJAAAAlAAAAAMAAQQJAAEAMgDhAAMAAQQJAAIADgEvAAMAAQQJAAMAVAFHAAMAAQQJAAQAMgHIAAMAAQQJAAUAGgIWAAMAAQQJAAYAKgJAAAMAAQQJAAcAcAKCAAMAA
#!/usr/bin/env bash
# a Day One CLI for macOS script generator for importing diary entries from Momento3 text exports
#
# Prerequisites:
#
# - install dayone2 CLI
# - brew install coreutils
#
#
# Usage: run the script inside a Momento Export (one text file per day format)
@kamermans
kamermans / docker_ephemeral_create.sh
Last active September 22, 2022 18:32
AWS EC2 script to mount Instance Store 0 and 1 as Docker temp and volume storage
#!/bin/sh -e
# This script will DESTROY /dev/xvdb and /dev/xvdc and remount them
# for Docker temp and volume storage.
# It is intended for EC2 instances with 2 ephemeral SSD instance stores
# like the c3.xlarge instance type.
service docker stop || true
# Setup Instance Store 0 for Docker Temp
# (set in /etc/default/docker)
@treyhunner
treyhunner / time_dict_merge.py
Last active November 3, 2023 08:13
Test performance of different dictionary merging functions in Python
"""
Results:
multiple_update: 33 ms
copy_and_update: 27 ms
dict_constructor: 29 ms
kwargs_hack: 33 ms
dict_comprehension: 33 ms
concatenate_items: 81 ms
union_items: 81 ms
@simont77
simont77 / elgato-eve.md
Last active January 27, 2024 13:31 — forked from gomfunkel/elgato-eve.md
Elgato Eve HomeKit Services & Characteristics

Elgato Eve HomeKit Services & Characteristics

A work in progress collection of proprietary and as of yet undocumented HomeKit characteristics and their UUIDs used by Elgato Eve.

Based on the work by gomfunkel and 0ff. Characteristics and data dump for Door, Motion and Thermo thanks to @NebzHB.

More infos not yet incorporated in the comment section.

This list is not including all Eve accessories available and some services and characteristics still make no sense to me. If you have anything to contribute, please leave a comment. There is no guarantee that the information listed below is correct.

@netj
netj / memusg
Last active January 29, 2024 15:04
memusg -- Measure memory usage of processes
#!/usr/bin/env bash
# memusg -- Measure memory usage of processes
# Usage: memusg COMMAND [ARGS]...
#
# Author: Jaeho Shin <netj@sparcs.org>
# Created: 2010-08-16
############################################################################
# Copyright 2010 Jaeho Shin. #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
#!/usr/bin/env bash
size=1024 # MB
mount_point=$HOME/tmp
name=$(basename "$mount_point")
usage() {
echo "usage: $(basename "$0") [mount | umount | remount | check | orphan]" \
"(default: mount)" >&2
}
@davatron5000
davatron5000 / gist:2254924
Created March 30, 2012 20:57
Static Site Generators

Backstory: I decided to crowdsource static site generator recommendations, so the following are actual real world suggested-to-me results. I then took those and sorted them by language/server and, just for a decent relative metric, their Github Watcher count. If you want a heap of other projects (including other languages like Haskell and Python) Nanoc has the mother of all site generator lists. If you recommend another one, by all means add a comment.

Ruby

@mpkocher
mpkocher / DataClasses.ipynb
Created May 25, 2019 01:55
Overview of Dataclasses, namedtuple, typing.NamedTuple, attrs and pydantic
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active March 8, 2024 02:11
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh