Skip to content

Instantly share code, notes, and snippets.

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

Neeraj Vashistha neerajvashistha

🏠
Working from home
View GitHub Profile
# Taken from https://github.com/leandrotoledo/python-telegram-bot/blob/master/telegram/emoji.py
"""This module contains a object that represents an Emoji"""
class Emoji(object):
"""This object represents an Emoji."""
GRINNING_FACE_WITH_SMILING_EYES = b'\xF0\x9F\x98\x81'
FACE_WITH_TEARS_OF_JOY = b'\xF0\x9F\x98\x82'
@neerajvashistha
neerajvashistha / motion.md
Last active April 25, 2020 23:29 — forked from endolith/readme.md
How to stream a webcam to a web browser in Ubuntu

Grr this took hours to figure out. I was trying to install MJPG-streamer and running VLC command lines and all this crap but nothing worked.

First install motion:

~> sudo apt-get install motion

Then create a config file:

~> mkdir ~/.motion

~> nano ~/.motion/motion.conf

@neerajvashistha
neerajvashistha / custom-juno.sh
Created March 28, 2020 05:49 — forked from evertontrindade/custom-juno.sh
Things to do after install Elementary OS 5.0 Juno
cd ~/Downloads
sudo apt-get update && sudo apt-get upgrade
#####################################################################
# Clean-up System
#####################################################################
sudo apt-get purge epiphany-browser epiphany-browser-data
sudo apt-get purge noise
sudo apt-get purge scratch-text-editor
@neerajvashistha
neerajvashistha / temp-indicator.py
Created November 22, 2019 00:23 — forked from atilberk/temp-indicator.py
An CPU/GPU temperature indicator in for Ubuntu
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# I am using this to monitor my cpu's temperature in the top bar of my os
# I have tested the script on Ubuntu 15.10 with Python 2.7.10
# Update: I used to require acpi but then found a simpler way
import sys,time,re,commands,os
from gi.repository import Gtk, GLib
@neerajvashistha
neerajvashistha / gbp-inr-indicator.py
Last active November 4, 2019 05:14 — forked from caiosba/dollar-reais-indicator.py
Ubuntu Unity Indicator to show current gbp value in indian rupee (auto-updates every minute)
#!/usr/bin/env python
# Unity indicator for dolar/real currency
# Author: Caio Almeida <caiosba@gmail.com>
# 05 Jul 2016
import gobject
import gtk
import appindicator
import os, sys
import time
@neerajvashistha
neerajvashistha / sp
Last active November 21, 2019 15:47 — forked from duncan-bayne/sp
sp is a command-line client for Spotify's dbus interface. Play, pause, skip and search tracks from the comfort of your command line.
#!/bin/bash
#
# This is sp, the command-line Spotify controller. It talks to a running
# instance of the Spotify Linux client over dbus, providing an interface not
# unlike mpc.
#
# Put differently, it allows you to control Spotify without leaving the comfort
# of your command line, and without a custom client or Premium subscription.
#
@neerajvashistha
neerajvashistha / waya-dl-setup.sh
Created May 15, 2019 06:28 — forked from mjdietzx/waya-dl-setup.sh
Install CUDA Toolkit v8.0 and cuDNN v6.0 on Ubuntu 16.04
#!/bin/bash
# install CUDA Toolkit v8.0
# instructions from https://developer.nvidia.com/cuda-downloads (linux -> x86_64 -> Ubuntu -> 16.04 -> deb (network))
CUDA_REPO_PKG="cuda-repo-ubuntu1604_8.0.61-1_amd64.deb"
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/${CUDA_REPO_PKG}
sudo dpkg -i ${CUDA_REPO_PKG}
sudo apt-get update
sudo apt-get -y install cuda