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
∇ app
∇ core
∇ guards
auth.guard.ts
module-import.guard.ts
no-auth.guard.ts
∇ interceptor
token.interceptor.ts
error.interceptor.ts
∇ services
@cevhyruz
cevhyruz / git-branch-simplify.md
Created April 9, 2021 16:07 — forked from datagrok/git-branch-simplify.md
How to simplify the graph produced by git log --graph

Ideas for improvements to git log --graph

I will maybe someday get around to dusting off my C and making these changes myself unless someone else does it first.

Make the graph for --topo-order less wiggly

Imagine a long-running development branch periodically merges from master. The git log --graph --all --topo-order is not as simple as it could be, as of git version 1.7.10.4.

It doesn't seem like a big deal in this example, but when you're trying to follow the history trails in ASCII and you've got several different branches displayed at once, it gets difficult quickly.

@cevhyruz
cevhyruz / Correct_GnuPG_Permission.sh
Created April 6, 2021 10:35 — forked from oseme-techguy/Correct_GnuPG_Permission.sh
This fixes the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error while using Gnupg .
#!/usr/bin/env bash
# To fix the " gpg: WARNING: unsafe permissions on homedir '/home/path/to/user/.gnupg' " error
# Make sure that the .gnupg directory and its contents is accessibile by your user.
chown -R $(whoami) ~/.gnupg/
# Also correct the permissions and access rights on the directory
chmod 600 ~/.gnupg/*
chmod 700 ~/.gnupg
@cevhyruz
cevhyruz / install-vim-8-with-python-ruby-lua-ubuntu.sh
Created April 4, 2021 15:56 — forked from erickpatrick/install-vim-8-with-python-ruby-lua-ubuntu.sh
Install Vim 8 with Python, Python 3, Ruby (2.5) and Lua support on Ubuntu
# remove current vim
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-gui-common
# removes current link for vim
sudo rm -rf /usr/local/share/vim /usr/bin/vim
# add ppa for newest version of ruby (currently, as of 06/06/2017, ruby v2.4)
sudo apt-add-repository ppa:brightbox/ruby-ng
sudo apt-get update
@cevhyruz
cevhyruz / TrueColour.md
Created March 30, 2020 02:47 — forked from XVilka/TrueColour.md
True Colour (16 million colours) support in various terminal applications and terminals

Terminal Colors

There exists common confusion about terminal colors. This is what we have right now:

  • Plain ASCII
  • ANSI escape codes: 16 color codes with bold/italic and background
  • 256 color palette: 216 colors + 16 ANSI + 24 gray (colors are 24-bit)
  • 24-bit true color: "888" colors (aka 16 milion)
@cevhyruz
cevhyruz / tmux_script.sh
Created September 25, 2018 09:22 — forked from febrianrendak/tmux_script.sh
This script will create new tmux session with current directory name as it session name. This script with create 3 windows, first window run vim, and two other windows with empty console. Second window split to two panes.
#!/bin/bash
function tmux_web {
SESSION_NAME=$1
#echo "Create.."
tmux new -s $SESSION_NAME -n editor -d
#echo "Creat first pane (editor).."
tmux send-keys -t $SESSION_NAME 'vim' C-m
#echo "Run vim in first pane.."
tmux new-window -n console -t $SESSION_NAME
@cevhyruz
cevhyruz / anmol-terminal.sh
Created August 24, 2018 11:14 — forked from anmoljagetia/anmol-terminal.sh
This is a script that adds a profile similar to the screenshot shown with Flatabulous in Gnome-Terminal.
#!/usr/bin/env bash
# Base16 - Gnome Terminal color scheme install script
[[ -z "$PROFILE_NAME" ]] && PROFILE_NAME="flatabulous-terminal"
[[ -z "$PROFILE_SLUG" ]] && PROFILE_SLUG="flatabulous-terminal"
[[ -z "$DCONF" ]] && DCONF=dconf
[[ -z "$UUIDGEN" ]] && UUIDGEN=uuidgen
dset() {
local key="$1"; shift
@cevhyruz
cevhyruz / pycurses.py
Created January 24, 2018 17:16 — forked from claymcleod/pycurses.py
Python curses example
import sys,os
import curses
def draw_menu(stdscr):
k = 0
cursor_x = 0
cursor_y = 0
# Clear and refresh the screen for a blank canvas
stdscr.clear()
@cevhyruz
cevhyruz / vim74_lua
Last active August 10, 2018 08:33 — forked from jdewit/vim74_lua
Installing vim 7.4 with lua on Ubuntu 12.04
# remove distributed packages
sudo apt-get remove --purge vim vim-runtime vim-gnome vim-tiny vim-common vim-gui-common
# for gvim
# sudo apt-get build-dep vim-gtk
# for gnome-vime
sudo apt-get build-dep vim-gnome
sudo apt-get install liblua5.1-dev luajit libluajit-5.1 python-dev ruby-dev libperl-dev libncurses5-dev libgnome2-dev libgnomeui-dev libgtk2.0-dev libatk1.0-dev libbonoboui2-dev libcairo2-dev libx11-dev libxpm-dev libxt-dev