Skip to content

Instantly share code, notes, and snippets.

@gsuuon
gsuuon / colors.lua
Last active March 18, 2024 13:41
My styled wezterm config - just the relevant bits
local wezterm = require 'wezterm'
local color_default_fg_light = wezterm.color.parse("#cacaca") -- 💩
local color_default_fg_dark = wezterm.color.parse("#303030")
return {
VERIDIAN = {
bg = wezterm.color.parse("#4D8060"),
fg = color_default_fg_light
},
@ChristopherA
ChristopherA / brew-bundle-brewfile-tips.md
Last active May 5, 2024 13:25
Brew Bundle Brewfile Tips

Brew Bundle Brewfile Tips

Copyright & License

Unless otherwise noted (either in this file or in a file's copyright section) the contents of this gist are Copyright ©️2020 by Christopher Allen, and are shared under spdx:Creative Commons Attribution Share Alike 4.0 International (CC-BY-SA-4.) open-source license.

Sponsor

If you more tips and advice like these, you can become a monthly patron on my GitHub Sponsor Page for as little as $5 a month; and your contributions will be multipled, as GitHub is matching the first $5,000! This gist is all about Homebrew, so if you like it you can support it by donating to them or becoming one of their Github Sponsors.

@danwild
danwild / d3-path-animation.html
Last active April 19, 2024 08:28
D3 animate dashed paths to represent flow
<!--https://stackoverflow.com/a/39731911/1177832-->
<!DOCTYPE html>
<html>
<head>
<script src="//cdnjs.cloudflare.com/ajax/libs/d3/3.5.3/d3.js"></script>
<style>
.node {
fill: #dddddd;
stroke: gray;
@gaearon
gaearon / prepack-gentle-intro-1.md
Last active May 3, 2024 12:56
A Gentle Introduction to Prepack, Part 1

Note:

When this guide is more complete, the plan is to move it into Prepack documentation.
For now I put it out as a gist to gather initial feedback.

A Gentle Introduction to Prepack (Part 1)

If you're building JavaScript apps, you might already be familiar with some tools that compile JavaScript code to equivalent JavaScript code:

  • Babel lets you use newer JavaScript language features, and outputs equivalent code that targets older JavaScript engines.
@DZuz14
DZuz14 / signup-user.js
Last active June 25, 2019 14:07
Async Await Action Creator with Redux Thunk
const BACKEND_URL = 'https://fakeserver.com/api'
export function signUpUser(email, password) {
return async (dispatch) => {
try {
const signUp = await axios.post(`${BACKEND_URL}/signup`, {
email: email,
password: password
})
@gbero
gbero / fish_shell_android_home.txt
Last active March 7, 2024 19:05
Export $ANDROID_HOME on MacOS with Fish shell
touch ~/.config/fish/config.fish;
echo "set --export ANDROID $HOME/Library/Android;" >> ~/.config/fish/config.fish
echo "set --export ANDROID_HOME $ANDROID/sdk;" >> ~/.config/fish/config.fish
echo "set -gx PATH $ANDROID_HOME/tools $PATH;" >> ~/.config/fish/config.fish
echo "set -gx PATH $ANDROID_HOME/tools/bin $PATH;" >> ~/.config/fish/config.fish
echo "set -gx PATH $ANDROID_HOME/platform-tools $PATH;" >> ~/.config/fish/config.fish
echo "set -gx PATH $ANDROID_HOME/emulator $PATH" >> ~/.config/fish/config.fish
echo "set --export JAVA_HOME /Applications/Android\ Studio.app/Contents/jbr/Contents/Home;" >> ~/.config/fish/config.fish
@int128
int128 / README.md
Last active January 21, 2024 14:52
Watching build mode on Create React App

Create React App does not provide watching build mode oficially (#1070).

This script provides watching build mode for an external tool such as Chrome Extensions or Firebase app.

How to Use

Create a React app.

Put the script into scripts/watch.js.

@turtlemonvh
turtlemonvh / Makefile
Last active January 23, 2024 03:33
Golang Project Makefile Template
# Borrowed from:
# https://github.com/silven/go-example/blob/master/Makefile
# https://vic.demuzere.be/articles/golang-makefile-crosscompile/
BINARY = superdo
VET_REPORT = vet.report
TEST_REPORT = tests.xml
GOARCH = amd64
VERSION?=?
#! /bin/bash
# Set the default policies to allow everything while we set up new rules.
# Prevents cutting yourself off when running from remote SSH.
iptables -P INPUT ACCEPT
iptables -P FORWARD ACCEPT
iptables -P OUTPUT ACCEPT
# Flush any existing rules, leaving just the defaults
iptables -F