Skip to content

Instantly share code, notes, and snippets.

@ValeriiVasin
ValeriiVasin / color.js
Created December 11, 2012 19:25
Colorized output in nodejs
var color, i;
// Notice: octal literals are not allowed in strict mode.
function colorize(color, output) {
return ['\033[', color, 'm', output, '\033[0m'].join('');
}
for (i = 0; i < 100; i += 1) {
color = Math.random() > 0.9 ? 91 : 92; // 91 - red, 92 - green
process.stdout.write( colorize(color, '●') );
@adamblank
adamblank / webkit.scrollbar.css
Created December 10, 2013 19:36
webkit styled minimalist gray scrollbar
::-webkit-scrollbar{
width: 10px;
}
::-webkit-scrollbar-track-piece{
background-color: #FFF;
}
::-webkit-scrollbar-thumb{
background-color: #CBCBCB;
@brettlangdon
brettlangdon / Wallpapers.md
Last active December 22, 2023 16:38
Wallpapers

Wallpapers

Install with git git clone https://gist.github.com/85942af486eb79118467.git ~/Pictures/wallpapers

@iamtekeste
iamtekeste / Download Google Drive files with WGET
Created July 8, 2015 11:00
Download Google Drive files with WGET
Download Google Drive files with WGET
Example Google Drive download link:
https://docs.google.com/open?id=[ID]
To download the file with WGET you need to use this link:
https://googledrive.com/host/[ID]
Example WGET command:
@andrewmilson
andrewmilson / file-upload-multipart.go
Last active May 20, 2024 14:46
Golang multipart/form-data File Upload
package main
import (
"net/http"
"os"
"bytes"
"path"
"path/filepath"
"mime/multipart"
"io"
@asukakenji
asukakenji / 0-go-os-arch.md
Last active June 8, 2024 22:33
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.17.1 darwin/amd64.

GOOS Values

GOOS Out of the Box
aix
android
@dianjuar
dianjuar / i3-shortcuts-screenshot.md
Last active June 5, 2024 15:47
My i3 shortcuts to take screenshots

Requirements

  • maim
  • xclip

Set-up

Set this on your i3 config file ~/.i3/config

# Screenshots
@ryo-ARAKI
ryo-ARAKI / starship.toml
Last active May 24, 2024 22:34
Starship configuration file
# ~/.config/starship.toml
[battery]
full_symbol = "🔋"
charging_symbol = "🔌"
discharging_symbol = ""
[[battery.display]]
threshold = 30
style = "bold red"
@marcojahn
marcojahn / conventional-commit-regex.md
Last active June 5, 2024 10:28
Conventional Commit Regex

the following regex will validate all examples provided here: https://www.conventionalcommits.org/en/v1.0.0/

  ^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test){1}(\([\w\-\.]+\))?(!)?: ([\w ])+([\s\S]*)

a grep/posix compatible variant

  ^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test){1}(\([[:alnum:]._-]+\))?(!)?: ([[:alnum:]])+([[:space:][:print:]]*)
@MikuroXina
MikuroXina / sustainPlusPlus.java
Last active August 26, 2023 21:11 — forked from sam830917/Mili_sustainPlusPlus.java
Mili - sustain++; / Ghost In The Shell: SAC_2045 Ending Theme
package extraLarge;
/**
* The goal of this program is to obtain a HEALTHY
* and SUSTAINABLE relationship, darling.
*
* @author Cassie Wei from Mili
*/
public class sustainPlusPlus {
public static void main(String[] args) {