Skip to content

Instantly share code, notes, and snippets.

View psivakrishnareddy's full-sized avatar

P SIVA KRISHNA REDDY psivakrishnareddy

View GitHub Profile
@psivakrishnareddy
psivakrishnareddy / turtle.py
Created March 19, 2023 09:45
This is a simple code exploring turtle package in python
from turtle import Screen, Turtle, colormode
import random
def random_color():
'''returns a Random rgb color tuple'''
return (random.randint(1,255),random.randint(1,255),random.randint(1,255))
turtle = Turtle()
colors = ('cornflower blue', 'lime green', 'red', 'dark magenta','light blue','gold','medium blue','dark orange')

Docker Basics

docker run <image_name | container_id,container_name>
docker run image:version
docker run python:3.6 cat /etc/*release*
@psivakrishnareddy
psivakrishnareddy / reactive-search-angular.js
Last active February 12, 2021 13:45
Code for a Reactive Search Component in angular.
## Reactive Search Component Angular
https://psivakrishnareddy.medium.com/reactive-search-component-using-rxjs-angular-app-explained-d9a10daab8e0
import { Component, ElementRef, EventEmitter, OnInit, Output } from '@angular/core';
import { Observable, fromEvent } from 'rxjs';
import { debounceTime, distinctUntilChanged, filter, map } from 'rxjs/operators';
import { SearchResults } from 'src/app/shared/models/search-result.model';
import { anyService } from 'any.service';
@Component({
@psivakrishnareddy
psivakrishnareddy / gist:b0d97b1e84b1a4fd4932e2c66c515829
Created January 7, 2021 17:40 — forked from digitaljhelms/gist:4287848
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch

Node Installation guide for Mac OS /Linux/Windows

Open your terminal & type

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash

Close your terminal & reopen a new one & type

@psivakrishnareddy
psivakrishnareddy / ssh.md
Created October 29, 2020 10:57 — forked from bradtraversy/ssh.md
SSH & DevOps Crash Course Snippets

SSH Cheat Sheet

This sheet goes along with this SSH YouTube tutorial

Login via SSH with password (LOCAL SERVER)

$ ssh brad@192.168.1.29

Create folder, file, install Apache (Just messing around)

$ mkdir test

$ cd test

@psivakrishnareddy
psivakrishnareddy / node_nginx_ssl.md
Last active October 29, 2020 10:54 — forked from bradtraversy/node_nginx_ssl.md
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@psivakrishnareddy
psivakrishnareddy / ContextApi-QuickStart.md
Last active March 6, 2022 08:00
Quick Start Guide to Create a Context API store Setup in React

React Context API QuickStart Guide

This is a Template for Context Api in react created by Siva Krishna Reddy.

ESSENTIALS

The Context api elements include Actions, Reducers, Store, Types

Store

Create a Store in a file and Export it.