Skip to content

Instantly share code, notes, and snippets.

View navjotjsingh's full-sized avatar
🏠
Working from home

Navjot Singh navjotjsingh

🏠
Working from home
View GitHub Profile
@ninadsp
ninadsp / README
Created January 6, 2018 06:58
Airtel Smartbytes Data Consumption Bash One Liner
Credits to:
# Airtel specific
https://github.com/paambaati/airtel-usage
https://gist.github.com/r4um/3414116
# General Bash help
StackOverflow
nixCraft/Vivek Gite
@vietdien2005
vietdien2005 / install.md
Last active December 7, 2024 10:42
Install Nagios + Nginx Centos 7
  • Install Dev Tools, PHP, Nginx
  sudo yum install nginx php php-fpm php-common gcc glibc glibc-common gd gd-devel make net-snmp unzip -y
  sudo yum groupinstall 'Development Tools' -y
  • Nginx – Nagios Configuration
  cd /etc/nginx/conf.d
  sudo vi nagios.conf

Exporting your 2FA tokens from Authy to transfer them into another 2FA application

IMPORTANT - Update regarding deprecation of Authy desktop apps

Past August 2024, Authy stopped supported the desktop version of their apps:
See Authy is shutting down its desktop app | The 2FA app Authy will only be available on Android and iOS starting in August for details.

And indeed, after a while, Authy changed something in their backend which now prevents the old desktop app from logging in. If you are already logged in, then you are in luck, and you can follow the instructions below to export your tokens.

If you are not logged in anymore, but can find a backup of the necessary files, then restore those files, and re-install Authy 2.2.3 following the instructions below, and it should work as expected.

@cravindra
cravindra / utils.js
Last active October 19, 2023 05:45
Vanilla JS Utils
/**
* Useful common operations wrttien in vanilla JS. Found, borrowed, created and modified from various sources on the internet.
*/
/**
* Helper to test if an element has a given class
* @param {*} el Element to test
* @param {*} className Class to test
*/
function hasClass(el, className) {
@aparrish
aparrish / understanding-word-vectors.ipynb
Last active May 8, 2025 14:50
Understanding word vectors: A tutorial for "Reading and Writing Electronic Text," a class I teach at ITP. (Python 2.7) Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@NickSeagull
NickSeagull / ubuntu-bloat-removal.sh
Last active April 6, 2025 10:56
Updated Jan 22nd, 2024 - Simple command to remove all "bloatware" from ubuntu
sudo apt-get remove \
aisleriot \
brltty \
duplicity \
empathy \
empathy-common \
example-content \
gnome-accessibility-themes \
gnome-contacts \
gnome-mahjongg \
@j-min
j-min / test_single_gpu.py
Created November 6, 2016 13:51
TensorFlow single GPU example
from __future__ import print_function
'''
Basic Multi GPU computation example using TensorFlow library.
Author: Aymeric Damien
Project: https://github.com/aymericdamien/TensorFlow-Examples/
'''
'''
This tutorial requires your machine to have 1 GPU
"/cpu:0": The CPU of your machine.
@vancluever
vancluever / gnome-tracker-disable.md
Last active April 9, 2025 07:13
GNOME Tracker Disable

Disabling GNOME Tracker and Other Info

GNOME's tracker is a CPU and privacy hog. There's a pretty good case as to why it's neither useful nor necessary here: http://lduros.net/posts/tracker-sucks-thanks-tracker/

After discovering it chowing 2 cores, I decided to go about disabling it.

Directories

@soheilhy
soheilhy / nginxproxy.md
Last active April 11, 2025 06:29
How to proxy web apps using nginx?

Virtual Hosts on nginx (CSC309)

When hosting our web applications, we often have one public IP address (i.e., an IP address visible to the outside world) using which we want to host multiple web apps. For example, one may wants to host three different web apps respectively for example1.com, example2.com, and example1.com/images on the same machine using a single IP address.

How can we do that? Well, the good news is Internet browsers

@fastmover
fastmover / setupsoftware.sh
Last active October 24, 2022 13:07
Auto install software for new Mac Setup.
#!/bin/bash
mkdir ~/getmacapps_temp
cd ~/getmacapps_temp
# Installing Chrome
curl -L -O "https://dl.google.com/chrome/mac/stable/GGRO/googlechrome.dmg"
hdiutil mount googlechrome.dmg
cp -R "/Volumes/Google Chrome/Google Chrome.app" /Applications
hdiutil unmount "/Volumes/Google Chrome"