Skip to content

Instantly share code, notes, and snippets.

View codarrenvelvindron's full-sized avatar

Codarren Velvindron codarrenvelvindron

View GitHub Profile
@codarrenvelvindron
codarrenvelvindron / sudo_creator.sh
Created March 20, 2018 06:04
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
@codarrenvelvindron
codarrenvelvindron / fast_setup.sh
Created March 20, 2018 06:06
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 http://archive.ubuntu.com/ubuntu/ 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
tasks:
- name: Install iptables Persistent
apt: name=netfilter-persistent state=present update_cache=true
- name: Set Loop Back Rule
iptables:
chain: INPUT
in_interface: lo
jump: ACCEPT
comment: 'Accept all loop back traffic'
---
- hosts: tls14
remote_user: secure
become: yes
become_method: sudo
tasks:
#!/bin/bash
#Check modified date of file and return the time elapsed between modification and current time
#Limiting API curl requests with bash
#By Codarren Velvindron
#Credits: https://stackoverflow.com/questions/1819187/test-a-file-date-with-bash
CWD="$( cd "$(dirname "$0")" ; pwd -P )"
file="$CWD/myfile.txt"
API_Request='curl -G -H "your_api_key:xxxxxxxxxxxx" https://your.api.url/your/endpoint -o $file'
wordpress
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
@codarrenvelvindron
codarrenvelvindron / convjson.py
Created March 25, 2021 18:57
Example for getting data from json file, made up of data dictionary and list
#Convjson, an example for getting data from a json file
#25/03/2021
#By Codarren Velvindron
#Licence: MIT
import json
#we init an empty dictionary
crypto_dictionary = {}
@codarrenvelvindron
codarrenvelvindron / currency_limits_25032021.json
Last active March 25, 2021 19:02
beautified json output (from cex.io)
{
"e": "currency_limits",
"ok": "ok",
"data": {
"pairs": [
{
"symbol1": "BTC",
"symbol2": "USD",
"pricePrecision": 1,
"minLotSize": 0.0004,
@codarrenvelvindron
codarrenvelvindron / hiveos_settings_ergo_autolykos2_3080ti.md
Created May 5, 2022 09:56
ZOTAC 3080 ti AMP HOLO - 274.46 Mh/s on ERGO - autolykos2

ZOTAC 3080 ti AMP Holo Settings:

CCLK offset: -125 Mhz

MCLK: 1545 Mhz (130%)

PL: 215W

HR: 252.44 MH/s
@codarrenvelvindron
codarrenvelvindron / ubuntu_vlc
Last active March 5, 2024 01:30
Ubuntu initial setup
#Install VIM
#Update distro
#Add universe and multiverse repository for non-free packages
#Update again to sync with new repositories
#Install vlc on Ubuntu
#Upgrade distro to latest kernel
sudo apt install vim -y
sudo apt update
sudo sed -i 's/restricted/universe\ multiverse/g' /etc/apt/sources.list