Skip to content

Instantly share code, notes, and snippets.

View dhairya137's full-sized avatar

Dhairya Patel dhairya137

View GitHub Profile
env:
AZURE_WEBAPP_NAME: reactapptutorial # set this to your application's name
AZURE_WEBAPP_PACKAGE_PATH: 'build' # set this to the path to your web app project, defaults to the repository root
NODE_VERSION: '10.x' # set this to the node version to use
jobs:
build-and-deploy:
name: Build and Deploy
runs-on: ubuntu-latest
steps:
# Youtube video reference
# https://www.youtube.com/watch?v=VT2L1SXFq9U
using namespace System.Management.Automation
using namespace System.Management.Automation.Language
if ($host.Name -eq 'ConsoleHost')
{
Import-Module PSReadLine
}
@dhairya137
dhairya137 / MainActivity.kt
Created August 14, 2021 16:00
Reusable Image card component made in Kotlin with jetpack compose.
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContent {
val painter = painterResource(id = R.drawable.mountains)
val description = "Mountains"
val title = "I am watching mountains"
Box(modifier = Modifier.fillMaxWidth(0.5f)
.padding(16.dp)
@dhairya137
dhairya137 / react_file.txt
Last active May 19, 2021 14:13
React app installation and configuration with nginx to create AMI
Step 1 - Install nvm(or node directly), Nginx (for nginx refer this -> https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-20-04)
Step 2 - Create react app
Step 3 - Build react app
Step 4 - Configure Nginx to the react build folder
Nginx configuration
-> cd /etc/nginx/sites-available/ (it has default file)
-> sudo nano default
@dhairya137
dhairya137 / zshrc
Created April 4, 2021 13:47
My Customized .zshrc file
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH="/home/dhairya/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
@dhairya137
dhairya137 / zsh_install2.bash
Created April 4, 2021 13:44
Zsh install bash script part 2
sudo apt-get install powerline fonts-powerline -y
sudo apt-get install zsh-theme-powerlevel9k -y
echo "source /usr/share/powerlevel9k/powerlevel9k.zsh-theme" >> ~/.zshrc
sudo apt-get install zsh-syntax-highlighting -y
echo "source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ~/.zshrc
sudo apt-get install git -y
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
echo "source /usr/share/powerlevel9k/powerlevel9k.zsh-theme" >> ~/.zshrc
@dhairya137
dhairya137 / zsh_install1.bash
Created April 4, 2021 13:43
zsh install bash script
sudo apt-get install zsh -y
sudo usermod -s /usr/bin/zsh $(whoami)
# comment
# sudo reboot
@dhairya137
dhairya137 / docker_install.sh
Created March 31, 2021 15:23
Docker full install bash script for ubuntu
sudo apt update
sudo apt install apt-transport-https ca-certificates curl software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
sudo apt update
apt-cache policy docker-ce
sudo apt install docker-ce
@dhairya137
dhairya137 / devcamper_specs.md
Created July 21, 2020 06:17 — forked from bradtraversy/devcamper_specs.md
Specs for Devcamper Udemy course project

DevCamper Backend API Specifications

Create the backend for a bootcamp directory website. The frontend/UI will be created by another team (future course). The html/css template has been created and can be used as a reference for functionality. All of the functionality below needs to be fully implmented in this project.

Bootcamps

  • List all bootcamps in the database
    • Pagination
    • Select specific fields in result
    • Limit number of results
  • Filter by fields