Skip to content

Instantly share code, notes, and snippets.

@roycyt
roycyt / roy.omp.json
Created August 4, 2023 07:28
roy.omp.json
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"newline": true,
"segments": [
{
"foreground": "#ffffff",
"style": "plain",
@roycyt
roycyt / vimrc
Last active February 12, 2020 05:49
vimrc
unlet! skip_defaults_vim
source $VIMRUNTIME/defaults.vim
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
call plug#begin('~/.vim/plugged')
@roycyt
roycyt / docker-ubuntu.sh
Last active February 10, 2020 09:03
Install Docker CE on the Ubuntu
# https://docs.docker.com/install/linux/docker-ce/ubuntu/
apt update
apt install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
add-apt-repository \
@roycyt
roycyt / TrueColour.md
Created August 14, 2018 13:05 — forked from XVilka/TrueColour.md
True Colour (16 million colours) support in various terminal applications and terminals

Colours in terminal

It's a common confusion about terminal colours... Actually we have this:

  • plain ascii
  • ansi escape codes (16 colour codes with bold/italic and background)
  • 256 colour palette (216 colours + 16 ansi + 24 gray) (colors are 24bit)
  • 24bit true colour ("888" colours (aka 16 milion))
printf "\x1b[${bg};2;${red};${green};${blue}m\n"
@roycyt
roycyt / gist:6b571c6583ff4af40940ee3fdbf0af4c
Created February 24, 2018 05:34
Qt Creator Segmentation fault
qt-creator-build $ ./bin/qtcreator -version
Qt Creator 4.6.82 based on Qt 5.6.2
# Open https://github.com/mirroring/dhcp/blob/v4_3/server/dhcpd.conf.5
# Then qtcreator crashed.
qt-creator-build $ gdb ./bin/qtcreator
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
@roycyt
roycyt / init.el
Created September 14, 2017 15:22 — forked from atilaneves/init.el
;;; init.el --- Atila Neves's custom emacs config
;; Copyright (C) 2013
;; Author: <aalvesne@cisco.com>
;; Keywords: init
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
@roycyt
roycyt / gist:aea7668015f8eb86cc7bbaa10344b293
Created September 8, 2017 14:41
Remap CapsLock to Ctrl
/etc/default/keyboard
XKBOPTIONS="ctrl:nocaps"
@roycyt
roycyt / gitconfig.ini
Created May 24, 2017 05:29 — forked from tdd/gitconfig.ini
Nice, useful global Git configuration
# Put this in your ~/.gitconfig or ~/.config/git/config
# Windows users: "~" is your profile's home directory, e.g. C:\Users\<YourName>
[user]
name = Your Full Name
email = your@email.tld
[color]
# Enable colors in color-supporting terminals
ui = auto
[alias]
st = status
@roycyt
roycyt / loading.org
Created July 2, 2016 02:46 — forked from TheBB/loading.org
Loading in Spacemacs

Emacs packages, features, files, layers, extensions, auto-loading, require, provide, use-package… All these terms getting you confused? Let’s clear up a few things.

Files

Emacs files contains code that can be evaluated. When evaluated, the functions, macros and modes defined in that file become available to the current Emacs session. Henceforth, this will be termed as loading a file.

One major problem is to ensure that all the correct files are loaded, and in the

@roycyt
roycyt / notes.md
Created May 27, 2016 14:53 — forked from DavidWittman/notes.md
A Brief Introduction to Fabric

A Brief Introduction to Fabric

Fabric is a deployment management framework written in Python which makes remotely managing multiple servers incredibly easy. If you've ever had to issue a change to a group servers, this should look pretty familiar:

for s in $(cat servers.txt); do ssh $s service httpd graceful; done

Fabric improves on this process by providing a suite of functions to run commands on the servers, as well as a number of other features which just aren't possible in a simple for loop. While a working knowledge of Python is helpful when using Fabric, it certainly isn't necessary. This tutorial will cover the steps necessary to get started with the framework and introduce how it can be used to improve on administering groups of servers.