Skip to content

Instantly share code, notes, and snippets.

View cevhyruz's full-sized avatar
:octocat:
Constantly learning stuff

John Fred Fadrigalan cevhyruz

:octocat:
Constantly learning stuff
View GitHub Profile
@junegunn
junegunn / gist:f4fca918e937e6bf5bad
Last active July 5, 2024 07:23
Browsing git commit history with fzf
# fshow - git commit browser (enter for show, ctrl-d for diff, ` toggles sort)
fshow() {
local out shas sha q k
while out=$(
git log --graph --color=always \
--format="%C(auto)%h%d %s %C(black)%C(bold)%cr" "$@" |
fzf --ansi --multi --no-sort --reverse --query="$q" \
--print-query --expect=ctrl-d --toggle-sort=\`); do
q=$(head -1 <<< "$out")
k=$(head -2 <<< "$out" | tail -1)
@ttscoff
ttscoff / dontforget.bash
Last active June 12, 2024 21:04
Quick reminders from Terminal (bash)
#!/bin/bash
# dontforget
#
# A stupid script for short term reminders in bash
#
# Arguments just need to contain a number and a bunch of words.
#
# The number can be anywhere in the arguments, but there shouldn't
# be any other numeric digits.
#
@yangxuan8282
yangxuan8282 / muttrc
Created December 9, 2016 08:56
Hotmail template config for mutt, just insert your mail account and password to "imap_user" and "imap_pass", if 2-factor is enable, generate an app password.
set ssl_starttls=yes
set ssl_force_tls=yes
set imap_user = 'user_name@hotmail.com'
set imap_pass = 'password_here'
set from= $imap_user
set use_from=yes
set realname='Your_Name'
set folder = imaps://imap-mail.outlook.com:993
set spoolfile = "+INBOX"
∇ app
∇ core
∇ guards
auth.guard.ts
module-import.guard.ts
no-auth.guard.ts
∇ interceptor
token.interceptor.ts
error.interceptor.ts
∇ services
@dimo414
dimo414 / _README.md
Last active November 28, 2022 07:25
Bash array expansion patterns for use with -u

Expanding Bash arrays safely with set -u

Prior to Bash 4.4 set -u treated empty arrays as "unset", and terminates the process. There are a number of possible workarounds using array parameter expansion, however almost all of them fail in certain Bash versions.

This gist is a supplement to this StackOverflow post.