Skip to content

Instantly share code, notes, and snippets.

View shivampip's full-sized avatar
🏡
In Quarantine

Shivam Agrawal shivampip

🏡
In Quarantine
View GitHub Profile
@shivampip
shivampip / AboutCard.css
Created February 11, 2020 07:02
Profile Card for Web
.aboutCardHidden{
display: none;
}
.aboutCardWrapper {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100vh;
display: flex;
@shivampip
shivampip / GithubCatRibbon.css
Created February 11, 2020 07:19
Github Cat Side Ribbon
.github-corner:hover .octo-arm {
animation: octocat-wave 560ms ease-in-out
}
@keyframes octocat-wave {
0%,
100% {
transform: rotate(0)
}
20%,
@shivampip
shivampip / App.js
Last active February 14, 2020 15:51
[Medium] Use External Script with React
import React from "react";
import Script from "react-load-script";
import Demo from "./Demo";
class App extends React.Component {
state = { scriptLoaded: false };
handleScriptError() {
console.log("Error while loading script");
}
@shivampip
shivampip / your-script.js
Created February 14, 2020 15:49
[MEDIUM][REACT][EXSC] script file
function helloLife(msg) {
console.log("LIFE: " + msg);
}
@shivampip
shivampip / Demo.js
Created February 14, 2020 15:54
[MEDIUM][REACT][EX-SCR] demo component
import React from "react";
class Demo extends React.Component {
render() {
if (this.props.ready) {
window.helloLife("Hey There");
}
return <div>THis is a demo</div>;
}
}
@shivampip
shivampip / README.md
Last active February 20, 2020 16:31
React Setup
  • Install node & npm
# Using Ubuntu
curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash -
sudo apt-get install -y nodejs
  • Verify
node -v
npm -v
@shivampip
shivampip / Python_Virtual_Evn.md
Last active April 12, 2020 08:02
Python Virtual Environment
  • Install virtual env
pip install virtualenv
  • Go to your project directory
cd project
  • Create virtual env
@shivampip
shivampip / Docker_on_Ubuntu.md
Created February 21, 2020 14:24
Docker Installation on Ubuntu
  • Uninstall old version
sudo apt-get remove docker docker-engine docker.io containerd runc
  • Set up the repo
sudo apt-get update

then

@shivampip
shivampip / Docker_Cheatsheet.md
Last active February 26, 2020 10:30
Docker Cheatsheet

Welcome to Docker

  • We downlaod the docker image.
  • Underlying host where docker is installed is called Docker Host
  • when we run the image, a container is created from that image.
  • that container runs.
  • we can run multiple container of same images.
  • every running container is assigned a container-name and container-id randomly by docker
  • we don't need to type full container-id. just type the minimum chars to distiguish from other running containers.
@shivampip
shivampip / settings.json
Created May 22, 2020 04:35
VS Code Pretier Tab problem
"editor.insertSpaces": false,
"editor.tabSize": 4,
"editor.detectIndentation": false,
"prettier.tabWidth": 4,
"prettier.useTabs": true // This made it finally work for me