Skip to content

Instantly share code, notes, and snippets.

View gucosme's full-sized avatar
🧬

Gustavo Cosme gucosme

🧬
View GitHub Profile
@ghifarit53
ghifarit53 / fancybar.ini
Last active November 6, 2023 20:54
fancybar config
[colors]
black = #1A1D45
bblack = #2c3073
white = #D7B7BB
red = #FF4EA5
green = #7EB564
yellow = #F5B569
blue = #7A89EC
magenta = #B66CDC
cyan = #6CAC99
@posener
posener / go-shebang-story.md
Last active March 29, 2024 08:38
Story: Writing Scripts with Go

Story: Writing Scripts with Go

This is a story about how I tried to use Go for scripting. In this story, I’ll discuss the need for a Go script, how we would expect it to behave and the possible implementations; During the discussion I’ll deep dive to scripts, shells, and shebangs. Finally, we’ll discuss solutions that will make Go scripts work.

Why Go is good for scripting?

While python and bash are popular scripting languages, C, C++ and Java are not used for scripts at all, and some languages are somewhere in between.

@yanzhihong23
yanzhihong23 / pm2-guard.js
Created April 28, 2017 10:24
pm2 cpu guard
'use strict';
const later = require('later');
const logger = require('./logger')('guard');
const pm2 = require('pm2');
const schedule = later.parse.recur().every(10).second();
// set local timezone
later.date.localTime();
@mastef
mastef / isexist_vs_isnotexist.go
Created February 4, 2016 08:30
os.IsExist(err) vs os.IsNotExist(err)
/*
Watch out, os.IsExist(err) != !os.IsNotExist(err)
They are error checkers, so use them only when err != nil, and you want to handle
specific errors in a different way!
Their main purpose is to wrap around OS error messages for you, so you don't have to test
for Windows/Unix/Mobile/other OS error messages for "file exists/directory exists" and
"file does not exist/directory does not exist"
@yoavniran
yoavniran / ultimate-ut-cheat-sheet.md
Last active June 1, 2024 09:44
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai, Sinon, and Jest
@shaykalyan
shaykalyan / ohmyzsh-theme-guide.md
Last active April 5, 2024 00:51
Oh My Zsh theme with Powerline font guide
@staltz
staltz / introrx.md
Last active June 7, 2024 23:39
The introduction to Reactive Programming you've been missing