Skip to content

Instantly share code, notes, and snippets.

View anmolsukki's full-sized avatar
🎯
Software Engineer | Web Developer

Anmol Kumar Singh anmolsukki

🎯
Software Engineer | Web Developer
View GitHub Profile
@anmolsukki
anmolsukki / index.html
Created May 31, 2020 08:30
[HTML] PDF Preview
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>PDF Preview</title>
</head>
<body>
<!-- Method 1 -->
<embed
@anmolsukki
anmolsukki / App.js
Created May 6, 2020 20:48
[ Build Deploy ] Build Deploy Locally with node server
const express = require('express');
const path = require('path');
const app = express();
app.use(express.static(path.join(__dirname, 'build')));
app.get('/', function(req, res) {
res.sendFile(path.join(__dirname, 'build', 'index.html'));
});
app.listen(9000);
@anmolsukki
anmolsukki / Badges.md
Last active March 7, 2023 09:42
[ Badges ] Badges File
import React, { Component } from "react";
class Storage extends Component {
setData = () => {
let obj = { name: "Anmol", age: "24", email: "[email protected]" };
localStorage.setItem("myData", JSON.stringify(obj));
};
getData = () => {
let data = localStorage.getItem("myData");
import React, { Component } from "react";
class App extends Component {
constructor(props) {
super(props);
this.state = {
items: [
{ title: "first", body: "This Is First" },
{ title: "Second", body: "This Is Second" },
{ title: "Third", body: "This Is Third" },
import React, { Component } from "react";
class Home extends Component {
constructor(props) {
super(props);
this.state = {
AccordionData: [
{ expanded: false, title: "collapse 1", body: "Accordian Example 1" },
{ expanded: false, title: "collapse 2", body: "Accordian Example 2" },
{ expanded: false, title: "collapse 3", body: "Accordian Example 3" },
import React from "react";
import axios from "axios";
const APIKEY = "AIzaSyDFVJQ4ucMjge4_7z3wIBlN4BQxAiI2f9c";
const ChannelID = "UCblDw1QEzTOL2CFO_BeV3Sw";
const result = 10;
var finalURL = `https://www.googleapis.com/youtube/v3/search?key=${APIKEY}&channelId=${ChannelID}&part=snippet,id&order=date&maxResults=${result}`;
class App extends React.Component {
constructor(props) {
@anmolsukki
anmolsukki / another_script.sh
Created May 5, 2020 14:02
[ Shell Script ] Run Shell Script by using another Shell Script
# another shell script
echo "This script is succesfully running."
echo "Have Fun."
@anmolsukki
anmolsukki / MongoBackup.sh
Created May 5, 2020 13:59
[ Shell Script ] Shell Script Basic Command
#!/bin/sh
# Database Name to backup
MONGO_DATABASE="dbname"
# Database host name
MONGO_HOST="127.0.0.1"
# Database port
MONGO_PORT="27017"
# Backup directory
BACKUPS_DIR="/Users/deepak/Desktop/BackupFile/$MONGO_DATABASE"
# Database user name
@anmolsukki
anmolsukki / App.js
Last active May 5, 2020 13:50
[ NodeJs ] Json File Crud ( yargs )
const yargs = require('yargs')
const notes = require('./notes.js')
// Customize yargs version
yargs.version('1.1.0')
// Create add command
yargs.command({
command: 'add',
describe: 'Add a new note',