Skip to content

Instantly share code, notes, and snippets.

View armsp's full-sized avatar
👋

Shantam Raj armsp

👋
View GitHub Profile
View story.json
{
"title": "SECOND VARIETY",
"author": "PHILIP K. DICK",
"story": "The claws were bad enough in the first place—nasty, crawling little death-robots. But when they began to imitate their creators, it was time for the human race to make peace—if it could!\nThe Russian soldier made his way nervously up the ragged side of the hill, holding his gun ready. He glanced around him, licking his dry lips, his face set. From time to time he reached up a gloved hand and wiped perspiration from his neck, pushing down his coat collar.\nEric turned to Corporal Leone. “Want him? Or can I have him?” He adjusted the view sight so the Russian’s features squarely filled the glass, the lines cutting across his hard, somber features.\nLeone considered. The Russian was close, moving rapidly, almost running. “Don’t fire. Wait.” Leone tensed. “I don’t think we’re needed.”\nThe Russian increased his pace, kicking ash and piles of debris out of his way. He reached the top of the hill and stopped, panting, staring around him. The sk
@armsp
armsp / gdp.csv
Created August 10, 2020 13:37
GDP of countries in current USD taken from World Bank
View gdp.csv
Series Name Series Code Country Name Country Code 2019 [YR2019]
GDP per capita (current US$) NY.GDP.PCAP.CD Afghanistan AFG 502.115486913067
GDP per capita (current US$) NY.GDP.PCAP.CD Albania ALB 5352.85741103671
GDP per capita (current US$) NY.GDP.PCAP.CD Algeria DZA 3948.34327892571
GDP per capita (current US$) NY.GDP.PCAP.CD American Samoa ASM ..
GDP per capita (current US$) NY.GDP.PCAP.CD Andorra AND 40886.3911648431
GDP per capita (current US$) NY.GDP.PCAP.CD Angola AGO 2973.59115979868
GDP per capita (current US$) NY.GDP.PCAP.CD Antigua and Barbuda ATG 17790.309306815
GDP per capita (current US$) NY.GDP.PCAP.CD Argentina ARG 10006.1489736082
GDP per capita (current US$) NY.GDP.PCAP.CD Armenia ARM 4622.73349328671
@armsp
armsp / list.md
Last active August 20, 2020 05:52
Softwares
View list.md
  • Foliate : EPUB Reader
  • Okular
  • Foxit PDF
  • Peek : Screencast GIFs
  • VSCode
  • Slack
  • Signal
  • Zoom
  • Spyder
  • VLC
@armsp
armsp / fontawesome-github.svg
Last active March 5, 2020 17:22
Gist for seeing the difference in Chrome and Firefox renderings for a two.js project
View fontawesome-github.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@armsp
armsp / username@hostname.py
Created November 11, 2019 17:50
Generate cool <username>@<hostname> like Docker does using Python
View username@hostname.py
import random
left = ["admiring",
"adoring",
"affectionate",
"agitated",
"amazing",
"angry",
"awesome",
"beautiful",
View Model+Predictive+Control+for+Closed+Loop+Insulin+Delivery-4.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@armsp
armsp / query.md
Last active February 8, 2020 11:46
GraphQL query to get user statistics like total followers, stargazers, watchers, issues, pull requests
View query.md
query {
  user(login:"<any user name>"){               #Use "viewer" if you want to run it on your profile
    repositories(orderBy: {field: STARGAZERS, direction: DESC}){
      totalCount
    }
    followers{
      totalCount
    }
 issues_sum:issues{
@armsp
armsp / highqualitygif.md
Last active January 14, 2019 10:17
How to create high quality gifs for Github READMEs
View highqualitygif.md

Steps:

  • Record a asciicast file

    • Use termtosvg record <outputfilename.cast> to record a asciicast file
    • Alternatively use asciinema rec to do the same i.e get an asciicast file
  • Then use asciicast2gif <asciicastfilename.cast> <outputfilename.gif> to convert asciicast to high quality gif

@armsp
armsp / Dockerfile
Created December 12, 2018 04:18
Gist containing simple Dockerfile and steps to run GUI from a docker container
View Dockerfile
#FROM python:3.7 ## Works with either of the base images. Size is larger with Python due to there being python2.7 too
FROM ubuntu:18.10
RUN apt-get update && apt-get upgrade -y
RUN apt-get install python3-dev python3-pip -y
RUN apt-get install python3-gi -y && \
apt-get install gir1.2-gtk-3.0 -y && \
apt-get install gir1.2-appindicator3-0.1 -y
@armsp
armsp / 30-randomize-mac-address.conf
Created December 9, 2018 04:24 — forked from fawkesley/30-randomize-mac-address.conf
MAC address randomization in Ubuntu 17+ (>= 1.4.1): save to /etc/NetworkManager/conf.d/
View 30-randomize-mac-address.conf
# /etc/NetworkManager/conf.d/30-randomize-mac-address.conf
# REQUIRES NETWORK MANAGER >= 1.4.1 (Ubuntu Zesty and above)
# Thanks to https://blogs.gnome.org/thaller/2016/08/26/mac-address-spoofing-in-networkmanager-1-4-0/
# This randomize your MAC address for *new* connections
# Be sure to change your existing (saved) connections in
# /etc/NetworkManager/system-connections/*