Skip to content

Instantly share code, notes, and snippets.

View theja0473's full-sized avatar
๐Ÿ˜œ
Learning New things

Thejeswarareddy R theja0473

๐Ÿ˜œ
Learning New things
View GitHub Profile
@theja0473
theja0473 / Dockerfile
Last active September 22, 2020 14:24 — forked from HermannBjorgvin/Dockerfile
Docker pipenv+pyenv configuration
FROM ubuntu:18.04
# set environmental variables
ENV PYENV_ROOT="/root/.pyenv" \
PATH="/root/.pyenv/shims:/root/.pyenv/bin:${PATH}" \
PIPENV_YES=1 \
PIPENV_DONT_LOAD_ENV=1 \
LC_ALL="C.UTF-8" \
LANG="en_US.UTF-8"
FROM alpine:latest
LABEL MAINTAINER="Faizan Bashir <faizan.ibn.bashir@gmail.com>"
# Linking of locale.h as xlocale.h
# This is done to ensure successfull install of python numpy package
# see https://forum.alpinelinux.org/comment/690#comment-690 for more information.
WORKDIR /var/www/
@theja0473
theja0473 / linux
Created April 30, 2019 11:56 — forked from jimboroberts/linux
Linux shell tips and tricks
Check if remote port is open with bash:
echo >/dev/tcp/8.8.8.8/53 && echo "open"
Suspend process:
Ctrl + z
Move process to foreground:
fg
Generate random hex number where n is number of characters:
@theja0473
theja0473 / gist:132ac344d79f35811b9101a3dd607762
Created April 9, 2019 13:24 — forked from jtheoof/gist:2880413
pre-commit SVN hook to prevent a commit if Jenkins is building or build is broken
#!/bin/sh
# PRE-COMMIT HOOK
#
# The pre-commit hook is invoked before a Subversion txn is
# committed. Subversion runs this hook by invoking a program
# (script, executable, binary, etc.) named 'pre-commit' (for which
# this file is a template), with the following ordered arguments:
#
# [1] REPOS-PATH (the path to this repository)
@theja0473
theja0473 / GitHub-Forking.md
Created March 7, 2019 09:24 — forked from Chaser324/GitHub-Forking.md
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j

@theja0473
theja0473 / git-cheatsheet.md
Created January 17, 2019 11:22
My simply Git Cheatsheet
@theja0473
theja0473 / repo-reset.md
Created January 17, 2019 11:19 — forked from heiswayi/repo-reset.md
GitHub - Delete commits history with git commands

First Method

Deleting the .git folder may cause problems in our git repository. If we want to delete all of our commits history, but keep the code in its current state, try this:

# Check out to a temporary branch:
git checkout --orphan TEMP_BRANCH

# Add all the files:
git add -A
@theja0473
theja0473 / sendGmail.py
Created November 14, 2018 11:59 — forked from L-fours-gists/sendGmail.py
Send an email through gmail with python
#!/usr/bin/python
"""
send an email through gmail
Save this script to send-gmail.py,
place the body of the email in email_message.txt,
and then run:
python send-gmail.py \
--wait 5 \

Network: Router RJ45 <--> Ethernet Port on Raspberry <--> TOR <--> Raspberry WIFI AC <--> WIFI CLIENT

# -- Download Rasbian Strech Lite from: https://www.raspberrypi.org/downloads/raspbian/
# -- Burn Image to SD-Card. 
# -- Boot Raspberry Pi 3. 

sudo apt-get update && sudo apt-get upgrade && sudo apt-get install git 
sudo raspi-config