[Go to memo](./Generate random colors that look great on white background.md).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ config, lib, pkgs, ... }: | |
{ | |
# Home Manager needs a bit of information about you and the | |
# paths it should manage. | |
home.username = "duhamean"; | |
home.homeDirectory = "/Users/duhamean"; | |
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [ | |
"mongodb-ce" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function recordCanvas(canvas, time) { | |
const frameRate = 60; | |
const mimeType = "video/webm"; | |
const chunks = []; | |
function saveChunks(evt) { | |
// store our final video's chunks | |
if (evt.data.size > 0) { | |
chunks.push(evt.data); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# DO NOT USE ANY OF THIS | |
This gist is here for my own reference. You can browse the files if you feel like it, | |
but keep in mind most of this code is plain garbage :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env node | |
import { promises as fs, createReadStream } from "fs"; | |
import { createBrotliCompress } from "zlib"; | |
import { resolve, join } from "path"; | |
const DIR = resolve(process.argv[2]); | |
fs.readdir(DIR) | |
.then(files => |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
lcm = !"git log -1 --pretty=%s" | |
lg = !"git lg1" | |
lg1 = !"git lg1-specific --all" | |
lg2 = !"git lg2-specific --all" | |
lg3 = !"git lg3-specific --all" | |
lg1-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(auto)%d%C(reset)' | |
lg2-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(auto)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' | |
lg3-specific = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset) %C(bold cyan)(committed: %cD)%C(reset) %C(auto)%d%C(reset)%n'' %C(white)%s%C(reset)%n'' %C(dim white)- %an <%ae> %C(reset) %C(dim white)(committer: %cn <%ce>)%C(reset)' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
tar -cf ~/Documents/home.tar ~/.vscode ~/.ssh ~/.config/fish ~/.config/Code ~/.bash_aliases |
You want to use the same files on different environment? Here is how to setup your Linux system.
It is strongly recommended to have a separate partition for every OS you want to
have and another partition on which you want to store your data. If you are
using UNIX-like OSes only, you can have a /home
partition that every OS will
share and you don't need this tutorial. However, if you want to use a Windows OS
as well, here is what you need to do.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { spawn } = require("child_process"); | |
const { promises: fs } = require("fs"); | |
const path = require("path"); | |
const GUETZLI_EXEC = "C:\\ProgramData\\chocolatey\\bin\\guetzli.EXE"; | |
const MAGICK_EXEC = "C:\\ProgramData\\chocolatey\\bin\\magick.EXE"; | |
// const sizes = [190, 290, 415, 830, 1125]; | |
// const sizes = [612]; | |
const sizes = [317, 830]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// libsass (v3.5.4) | |
// ---- | |
// custom responsive | |
// custom variables | |
// colors | |
// main colors | |
$custom-color-primary: #3dcd58; |
NewerOlder