Skip to content

Instantly share code, notes, and snippets.


Abhinav Gauniyal agauniyal

View GitHub Profile
View startup_logs.txt
-- Journal begins at Wed 2020-12-09 15:33:51 IST, ends at Fri 2021-01-01 16:15:54 IST. --
Jan 01 13:02:23 manjaro kernel: TSC synchronization [CPU#0 -> CPU#8]:
Jan 01 13:02:23 manjaro kernel: Measured 4524 cycles TSC warp between CPUs, turning off TSC clock.
Jan 01 13:02:23 manjaro kernel: #9 #10 #11 #12 #13 #14 #15
Jan 01 13:02:23 manjaro kernel: ACPI BIOS Error (bug): Failure creating named object [\SMIB], AE_ALREADY_EXISTS (20200925/dsfield-637)
Jan 01 13:02:23 manjaro kernel: ACPI Warning: NsLookup: Type mismatch on SMIB (Integer), searching for (RegionField) (20200925/nsaccess-697)
Jan 01 13:02:23 manjaro kernel: ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.GPP4.WLAN], AE_NOT_FOUND (20200925/dswload2-162)
Jan 01 13:02:23 manjaro kernel: ACPI Error: AE_NOT_FOUND, During name lookup/catalog (20200925/psobject-220)
Jan 01 13:02:23 manjaro kernel: Expanded resource Reserved due to conflict with PCI Bus 0000:00
Jan 01 13:02:23 manjaro kernel: pci 0000:00:00.2: can't derive routing for PCI INT
agauniyal / allocterminal.cpp
Created Jan 27, 2018 — forked from kingseva/allocterminal.cpp
Example redirecting cout/stdout to allocated terminal in GUI programs.
View allocterminal.cpp
#include "rang.hpp"
#include <windows.h>
#include <cstdlib>
void BindStdHandlesToConsole()
//TODO: Add Error checking.
// Redirect the CRT standard input, output, and error handles to the console


Implementation of REST Webservice for the P2PSP media sources.

Work Report

Crossroads is a REST api server capable of creating and managing P2PSP channels. It is written in Javascript and uses Node runtime to achieve low-overhead request-response model. In current implementation, it provides functionality for creating, editing and deletion of channels by user and manages all processes by itself in background. The processes are spawned and killed in accordance with their lifetime and proper care is taken to avoid any sort of shell injection or

View settings.json
"editor.fontFamily": "'Droid Sans Mono', monospace",
"editor.fontSize": 13,
"editor.lineHeight": 20,
"editor.insertSpaces": false,
"editor.detectIndentation": true,
"editor.roundedSelection": false,
"editor.selectionHighlight": false,
"editor.scrollBeyondLastLine": false,
"editor.wrappingColumn": 120,
agauniyal /
Created Dec 11, 2016 — forked from XVilka/
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"
View g++ test
// g++ test.cpp --std=c++11 -lpthread -O2
//#ifdef WIN32 <- stdafx breaks this ifdef...
//#include "stdafx.h"
#include <iostream>
#include <atomic>
#include <thread>
#include <vector>

Keybase proof

I hereby claim:

  • I am agauniyal on github.
  • I am agauniyal ( on keybase.
  • I have a public key ASDRMAmVApQB2qu9Z0kiInRy44brEzO5A1PYs7tGjOdxVAo

To claim this, I am signing this object:

agauniyal / eslintrc.json
Created May 25, 2016
default eslintrc for node & js
View eslintrc.json
"env": {
"node" : true,
"es6" : true,
"mocha": true
"rules": {
"accessor-pairs": "error",
"array-bracket-spacing": [2, "never"],
"array-callback-return": "error",
agauniyal / byeclient.cpp
Created Mar 14, 2016
View byeclient.cpp
#include <iostream>
#include <string>
#include <cstring>
extern "C" {
#include <unistd.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netdb.h>
#include <arpa/inet.h>

How to Setup emacs irony-mode in Ubuntu-12.04

I recently found a nice emacs-mode, [irony-mode], which can be used with [company-mode], [flycheck-mode], and [eldoc-mode]. It works nicely with CMake-based projects. The document contains a list of instructions for setting things up. I assume that you're using a fresh-installed Ubuntu-12.04.5 (64-bit). It uses [Lean theorem prover][lean] as an example project.