Skip to content

Instantly share code, notes, and snippets.

View atkvishnu's full-sized avatar
🏎️
💨

Kumar Vishnu atkvishnu

🏎️
💨
View GitHub Profile
@atkvishnu
atkvishnu / dino.md
Last active December 8, 2022 15:38
chrome://dino/
  1. Disable gameover functionality
var original = Runner.prototype.gameOver
Runner.prototype.gameOver = function (){}
  1. Enable gameover functionality
@atkvishnu
atkvishnu / settings.json
Created February 24, 2022 03:23
VSCode personal settings.json
{
"workbench.startupEditor": "none",
"code-runner.fileDirectoryAsCwd": true,
"code-runner.runInTerminal": true,
"code-runner.saveFileBeforeRun": true,
"code-runner.terminalRoot": "/mnt/",
// shell config
// "code-runner.terminalRoot": "/mnt/",
// "terminal.external.windowsExec": "/mnt/c/Windows/System32/cmd.exe",
"terminal.integrated.profiles.windows": {
" VIM Configuration File
" Description: Optimized for C/C++ development for now.
" Author: Vishnu
"
" disable vi compatibility (emulation of old bugs - it's better to be safe than sorry)
set nocompatible
" use indentation of previous line
set autoindent
" use intelligent indentation for C
@atkvishnu
atkvishnu / unix_watch.md
Last active April 5, 2022 09:16
UNIX watch command

watch command in Linux

watch runs command repeatedly, displaying its output (the first screenfull). This allows you to watch the program output change over time. By default, the program is run every 2 seconds; use -n or --interval to specify a different interval.

Function: Execute a program periodically, showing output fullscreen
Syntax: watch [options] command
Syntax: watch [-bdehpvtx] [-n seconds] [--beep] [--color] [--differences[=cumulative]] [--errexit] [--exec] [--help] [--interval=seconds] [--no-title] [--precise] [--version] command

Description

@atkvishnu
atkvishnu / tmux.md
Last active April 12, 2023 07:39
TMUX cheatsheet #tmux #cheatsheets #shortcuts

TMUX CheatSheet tmux

Installation:

  • Ubuntu and Debian: sudo apt-get install mux
  • CentOS and Fedora: sudo yum install tmux
  • macOS: brew install tmux
  • Windows: a good workaround for windows is using Ubuntu WSL which can be installed from the Microsoft store.

3 Major things in MUX:

@atkvishnu
atkvishnu / linux.md
Last active November 9, 2021 15:21
Linux essential applications

Applications

  • Rambox -> Multiple messaging platforms all in one
  • Kodi -> Media from 3rd party services
  • Stacer -> cleaner and optimizer
  • Calibre -> E-book reader
  • Timeshift -> create backups/ snapshots
  • Gnome Tweak Tools
  • Kdenlive -> video editing
  • Synaptic Package Manager -> fine control over packages
@atkvishnu
atkvishnu / RClone.md
Last active November 9, 2021 15:23
Rclone commands for mounting cloud drives

RClone:

Rclone is an open source, multi threaded, command line computer program to manage or migrate content on cloud and other high latency storage. Its capabilities include sync, transfer, crypt, cache, union, compress and mount. The rclone website lists supported backends including S3, and Google Drive.

Descriptions of rclone often carry the strapline Rclone syncs your files to cloud storage. Those prior to 2020 include the alternative Rsync for Cloud Storage. Users have called rclone The Swiss Army Knife of cloud storage.

Rclone is well known for its rclone sync and rclone mount commands. It provides further management functions analogous to those ordinarily used for files on local disks, but which tolerate some intermittent and unreliable service. Rclone is commonly a front-end for media servers such as Plex, Emby or Jellyfin to stream content direct from consumer file storage services.

>Official Ubuntu, Debian, Fedora, Gentoo, Arch, Brew, Chocolatey, and other package managers include rcl

@atkvishnu
atkvishnu / t.md
Created November 9, 2021 14:27
Combining the split zip files downloaded from Google Drive

A solution for Mac or Linux command line.

mkdir combined
unzip '*.zip' -d combined

Or, for Windows Powershell, try:

@atkvishnu
atkvishnu / dynamicArray.cpp
Last active October 25, 2021 19:28
C++ - "Allocating array of pointers on Heap"
// declare dynamic array in C++
int main()
{
int size;
std::cin >> size;
int *array = new int[size];
delete [] array;
@atkvishnu
atkvishnu / HTTPrequest.js
Last active October 25, 2021 19:30
AJAX object
(function (global) {
// Set up a namespace for our utility
var ajaxUtils = {};
// Returns an HTTP request object
function getRequestObject() {
if (global.XMLHttpRequest) {
return (new XMLHttpRequest());