Skip to content

Instantly share code, notes, and snippets.

View dangh's full-sized avatar
🤖
I may be slow to respond.

Dang dangh

🤖
I may be slow to respond.
View GitHub Profile
@mhucka
mhucka / gist:59e785a315d813d14cd0258b89a2fcac
Last active February 2, 2024 22:28
Stop the Adobe Creative Cloud app from auto-launching on login on macOS
#!/bin/bash
# =============================================================================
# @file GitHub gist
# @brief stop Adobe Creative Cloud app from auto-launching on login on macOS
# @author Michael Hucka <mhucka@caltech.edu>
# @created 2021-08-12
# @website https://gist.github.com/mhucka/59e785a315d813d14cd0258b89a2fcac
#
# I find Adobe Creative Cloud absolutely infuriating. It installs auto
# launchers that are not in the user's login app list, and the services are
@OdatNurd
OdatNurd / .python-version
Last active July 8, 2024 03:37
Browse all Sublime Text commands provided by plugins
3.8
<!--
Put this file in ~/Library/LaunchAgents/com.example.KeyRemapping.plist to
automatically remap your keys when macOS starts.
See https://developer.apple.com/library/archive/technotes/tn2450/_index.html for
the key "usage IDs". Take the usage ID and add 0x700000000 to it before putting it
into a source or destination (HIDKeyboardModifierMappingSrc and
HIDKeyboardModifierMappingDst respectively).
-->
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
@jpbarto
jpbarto / simple_sklearn_transformer.py
Created June 20, 2019 08:05
Simple SKLearn script to transform some inputs using the SKLearn Estimator on Amazon SageMaker
import pandas as pd
import numpy as np
import argparse
from sklearn import preprocessing
import pickle
import os
from io import StringIO
from sagemaker_containers.beta.framework import (
content_types, encoders, env, modules, transformer, worker)
@thundernixon
thundernixon / set-is_fixed_pitch-to_true.sh
Last active June 22, 2023 07:16
A shell script to update 'isFixedPitch' attribute 'value' from 0 to 1 on OpenType POST table. Also updates the font version.
# requires XMLstarlet: https://brewformulas.org/Xmlstarlet
# requires gftools: pip install git+https://github.com/googlefonts/gftools
# updates isFixedPitch attribute 'value' from 0 to 1 on OpenType POST table
#
# USAGE:
# TTX a file in the family to see its current version number in nameID 5
# $ ttx -t name <font_path>
# then, on the command line, run:
# $ chmod +x <relative_path>/set-is_fixed_pitch.sh
@miyaokamarina
miyaokamarina / conditions.js
Last active March 9, 2023 15:31
Type-level conditions in Flow https://is.gd/OPsJBd
// Licensed under CC BY 4.0.
type $If<X: boolean, Then, Else = empty> = $Call<
& ((true, Then, Else) => Then)
& ((false, Then, Else) => Else),
X,
Then,
Else,
>;

In this tutorial we're going to build a set of parser combinators.

What is a parser combinator?

We'll answer the above question in 2 steps.

  1. What is a parser?
  2. and, what is a parser combinator?

So first question: What is parser?

dialog {
position: fixed;
top: 50%;
left: 50%;
right: auto;
padding: 30px;
transform: perspective(500px) translate(-50%, -50%);
background: linear-gradient(to bottom, #FFF, #F4F4F4) #FFF;
border: none;
border-radius: 3px;
@andywer
andywer / talk-proposal.md
Last active December 23, 2020 17:22
Reactive Conf 2017 ⚡️ Talk Proposal - Memory Leak Hunt 2017 Style

This is a proposal for lightning talk at Reactive Conf. Please 🌟 this gist to push the proposal!

Memory Leak Testing in 2017

Hi, I am Andy, creator of leakage - the node-powered memory leak testing library.

Instead of manual debugging it provides a structured approach to fix or even prevent memory leaks.

@MariusRumpf
MariusRumpf / config.json
Last active November 23, 2021 02:35
Detect irregular whitespace in visual studio code with whitespace+ extension
// Whitespace+ irregular whitespace detection
// https://marketplace.visualstudio.com/items?itemName=davidhouchin.whitespace-plus
// Inspired by eslint https://github.com/eslint/eslint/blob/master/lib/rules/no-irregular-whitespace.js
{
"mode": "all",
"autoStart": true,
"refreshRate": 100,
"elements":
[{
"name": "space",