Skip to content

Instantly share code, notes, and snippets.

💭
Looking for cool hardware projects

Shantam Raj armsp

💭
Looking for cool hardware projects
Block or report user

Report or block armsp

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@armsp
armsp / highqualitygif.md
Last active Jan 14, 2019
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 Dec 12, 2018
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 Dec 9, 2018 — forked from paulfurley/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/*
@armsp
armsp / study.md
Created Oct 31, 2018
GraphQL notes
View study.md

Node

Objects

Connections

Interfaces

Implements

Implementations

What are all those terms you see in the example queries? Read the Github GraphQL API Schema. Schema has the definitions of all the objects, relationships, fields etc

Field

@armsp
armsp / punch.py
Created Aug 29, 2018 — forked from koenbollen/punch.py
Proof of Concept: UDP Hole Punching
View punch.py
#!/usr/bin/env python
#
# Proof of Concept: UDP Hole Punching
# Two client connect to a server and get redirected to each other.
#
# This is the client.
#
# Koen Bollen <meneer koenbollen nl>
# 2010 GPL
#
@armsp
armsp / HTTP status codes.md
Created Aug 26, 2018
Proper way to return HTTP status codes with custom messages when a restful API on Flask server fails while processing inputs.
View HTTP status codes.md

HTTP Error Codes

  • 1xx : Informational
  • 2xx : Success
  • 3xx : Redirection
  • 4xx : Client Error
  • 5xx : Server Error

HTTP Status Codes from MDN

200 OK

@armsp
armsp / Dockerfile
Last active Aug 25, 2018
Dockerfile to install python, pandas, sklearn, numpy, scipy on a ubuntu 18.10 container (works under restricted ssl certificate environments too)
View Dockerfile
FROM ubuntu:18.10
RUN apt-get update && apt-get upgrade -y \
&& apt-get install -y --no-install-recommends apt-utils software-properties-common wget \
&& apt-get install -y build-essential python3 python3-distutils \
&& wget --no-check-certificate https://bootstrap.pypa.io/get-pip.py \
&& python3 get-pip.py --trusted-host pypi.org --trusted-host files.pythonhosted.org
#RUN apt-get install python3.6 python-pip
#RUN python -m pip install pip --upgrade
#RUN python -m pip install wheel
#RUN apt-get install -y python3-numpy
@armsp
armsp / Steps.md
Last active May 6, 2019
Steps to run ARM containers on x86
View Steps.md
  • Install qemu-arm-static
  • Pull arm32v7/debian:jessie
  • docker run -v /usr/bin/qemu-arm-static:/usr/bin/qemu-arm-static --rm -it arm32v7/debian:jessie --name rpi-test
  • apt-get update
  • apt-get upgrade
  • apt-get install nano
  • apt-get install binutils apt-utils
  • apt-get install build-essential build-essential in turn installs the following- binutils bzip2 cpp cpp-4.9 dpkg-dev fakeroot g++ g++-4.9 gcc gcc-4.9 ifupdown isc-dhcp-client
@armsp
armsp / docker-compose.yaml
Last active Sep 16, 2018
Experiments with docker-compose
View docker-compose.yaml
version: '3'
services:
client:
#image: ubuntu:18.10
# build : This directive can be used instead of image. Specifies the location of the Dockerfile that will be used to build this container
build: ./
container_name: Chat_client
volumes:
- ./:/code
@armsp
armsp / Poetry_magazines.md
Last active Sep 9, 2018
A list of curated magazines that accept poetry. Work in progress.
View Poetry_magazines.md

Poetry Foundation

  • Year round submissions
  • Provide handsome compensation
  • Submissions
  • Response Time : 7 months

VQR

  • Peading Period: July 1-31
  • Very handsome Compensation
  • Submissions
You can’t perform that action at this time.