Skip to content

Instantly share code, notes, and snippets.

View nmichlo's full-sized avatar
🐋

Nathan nmichlo

🐋
View GitHub Profile
@jasonm23
jasonm23 / xterm-256color.svg
Last active July 10, 2024 20:18
Xterm 256color mode color chart, organised into sections. (used on Wikipedia/xterm)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OS=`echo \`uname\` | tr '[:upper:]' '[:lower:]'`
AURL="https://gist.githubusercontent.com/hightemp/5071909/raw/"
ANAME=".bash_aliases"
TMPAPATH="/tmp/$ANAME"
HOMEAPATH="~/$ANAME"
[ "$OS" = "windowsnt" ] && OS_WIN="yes"
[ "$OS" = "darwin" ] && OS_MAC="yes"
[ "$OS" = "linux" ] && OS_LIN="yes"
@stephenll
stephenll / .bash_profile
Created February 2, 2014 02:45 — forked from jernejcic/.bash_profile
.bash_profile file on Mac OS X
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases.
# Much of this was originally copied from:
# http://natelandau.com/my-mac-osx-bash_profile/
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
@natelandau
natelandau / .bash_profile
Last active July 27, 2024 05:39
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@kjbrum
kjbrum / bash_profile.sh
Last active June 14, 2024 19:58
My personal bash profile
#---------------------------------------------------------------------------------------------------------------------------------------
#
# Author: Kyle Brumm
# Description: File used to hold Bash configuration, aliases, functions, completions, etc...
#
# Sections:
# 1. ENVIRONMENT SETUP
# 2. MAKE TERMINAL BETTER
# 3. FOLDER MANAGEMENT
# 4. MISC ALIAS'
@MehdiNS
MehdiNS / ordered_dithering.txt
Last active October 30, 2023 17:15
Ordered dithering explanation
(Written as a way to stop forgetting these things.
May be wrong sometimes, as it's just the result of my research here and there.
If it helps you, give me a shout!)
Ordered dithering is a technique used to reduce - deliberately! - the precision of an image.
Motivation : artistic (mainly ?), color quantization --> reduce the number of color in an image
----------------------------------------------------------------
INTRODUCTION
@nasimrahaman
nasimrahaman / continoulli_with_logits.py
Created July 24, 2019 20:28
Continoulli with Logits
import torch
import torch.nn as nn
class ContinoulliWithLogitsLoss(nn.BCEWithLogitsLoss):
"""
Numerically stable implementation of the objective function defined in [1].
[1] https://arxiv.org/abs/1907.06845
"""
@foobarhl
foobarhl / cloudflare-ddns-update.sh
Last active January 2, 2024 14:37 — forked from Tras2/cloudflare-ddns-update.sh
A bash script to update a Cloudflare DNS A record with the external IP of the source machine
#!/bin/bash
# A bash script to update a Cloudflare DNS A record with the external IP of the source machine
# Used to provide DDNS service for my home
# Needs the DNS record pre-creating on Cloudflare
## Based on https://gist.github.com/Tras2/cba88201b17d765ec065ccbedfb16d9a with updates to use
## per-zone configurable access tokens available in the API sections of your Cloudflare profile
## - info@foo-games.com
@nmichlo
nmichlo / xterm_control_sequences.py
Last active January 27, 2024 15:12
XTerm Control Sequences
# XTerm Control Sequences based on:
# - https://invisible-island.net/xterm/ctlseqs/ctlseqs.html
# ========================================================================= #
# XTerm Control Sequences from invisible-island.net as pythonic code.
# Basic control sequences are string variables.
# - eg: ESC = '\033'
# CSI = ESC + '['
# Control sequences that have args can be called to return a string.
# - eg: sgr = CSI + Ps + 'm'
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.