Skip to content

Instantly share code, notes, and snippets.


Codarren Velvindron codarrenvelvindron

View GitHub Profile
codarrenvelvindron / currency_limits_25032021.json
Last active Mar 25, 2021
beautified json output (from
View currency_limits_25032021.json
"e": "currency_limits",
"ok": "ok",
"data": {
"pairs": [
"symbol1": "BTC",
"symbol2": "USD",
"pricePrecision": 1,
"minLotSize": 0.0004,
codarrenvelvindron /
Created Mar 25, 2021
Example for getting data from json file, made up of data dictionary and list
#Convjson, an example for getting data from a json file
#By Codarren Velvindron
#Licence: MIT
import json
#we init an empty dictionary
crypto_dictionary = {}
View job1.txt
member space --> training/coaching videos
parcours client --> client fidelity
Buy domain names --> make online websites
hosting management
latest technologies
Landing page --> user clicks on a link --> main markmeting page
#Check modified date of file and return the time elapsed between modification and current time
#Limiting API curl requests with bash
#By Codarren Velvindron
CWD="$( cd "$(dirname "$0")" ; pwd -P )"
API_Request='curl -G -H "your_api_key:xxxxxxxxxxxx" https://your.api.url/your/endpoint -o $file'
View start_firewall_rules.yml
- hosts: tls14
remote_user: secure
become: yes
become_method: sudo
View firewall_rules.yml
- name: Install iptables Persistent
apt: name=netfilter-persistent state=present update_cache=true
- name: Set Loop Back Rule
chain: INPUT
in_interface: lo
jump: ACCEPT
comment: 'Accept all loop back traffic'
codarrenvelvindron /
Created Mar 20, 2018
Prerequisites: Ubuntu, nvidia card, dev environment . Run as sudo user
#Add ubuntu package archive
echo "Adding ubuntu package archive to sources list"
sudo echo "deb-src xenial main" >> /etc/apt/sources.list
echo "Updating repo list"
sudo apt-get update
echo "Done.."
#Install graphics drivers
echo "Installing nvidia graphics drivers"
sudo apt-get purge nvidia
codarrenvelvindron /
Created Mar 20, 2018
Create sudo account and automatically switch to it through a shell script. Must be run as root. Works on Ubuntu, Fedora and should work on other linux distros as well.
#!/usr/bin/env bash
#Add sudo user
echo "Enter account name to make sudo"
read account
adduser $account
echo "Done.."
#Adding username to sudo group
echo "Adding $account to sudo"
usermod -aG sudo $account