Skip to content

Instantly share code, notes, and snippets.

Avatar
🇮🇳

Debashis Barman debashisbarman

🇮🇳
View GitHub Profile
View gist:f03efb44f5e5968be6a5890166e7ad6e
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
View nvmCommands.js
// check version
node -v || node --version
// list installed versions of node (via nvm)
nvm ls
// install specific version of node
nvm install 6.9.2
// set default version of node
@debashisbarman
debashisbarman / forwardport.sh
Created May 15, 2020 — forked from Bostonncity/forwardport.sh
Forward port 80 to 8080 on EC2 instance.
View forwardport.sh
sudo iptables -t nat -L
sudo iptables -t nat -A PREROUTING -p tcp --dport 80 -j REDIRECT --to-ports 8000
View HTML.md

Hypertext Markup Language (HTML)

Hypertext Markup Language (HTML) is the standard markup language for creating web pages and web applications. HTML is the code that is used to structure a web page and its content. For example, content could be structured within a set of paragraphs, a list of bulleted points, or using images and tables. In this article we'll discuss all the concepts of HTML which will be enough to start any future web projects.

Read more

  1. https://en.wikipedia.org/wiki/HTML
  2. https://developer.mozilla.org/en-US/docs/Learn/Getting_started_with_the_web/HTML_basics

Core Concepts

@debashisbarman
debashisbarman / semantic-layout.html
Created Nov 2, 2017 — forked from thomd/semantic-layout.html
Standard HTML5 Semantic Layout
View semantic-layout.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Title</title>
<link href="stylesheets/main.css" rel="stylesheet" />
</head>
<body>
<header>
<hgroup>
@debashisbarman
debashisbarman / api.js
Last active Aug 17, 2017
RESTful API for a Demo Model
View api.js
const express = require('express');
const app = express();
const router = express.Router();
const host = '';
const port = '';
const user = '';
const password = '';
const database = '';
@debashisbarman
debashisbarman / README.md
Last active Jun 14, 2021
A boilerplate Twitter bot that can retweet in response to the tweets matching particluar keyword (https://goo.gl/4whEIt)
View README.md

Creating a Twitter bot with Node.js

Learn how you can create your own Twitter bot using Node.js and the new Twitter API. The bot will auto retweet in response to tweets with some particular hashtags. (https://goo.gl/4whEIt)

Tools we need

Here are the tools we’ll be using to create the bot — 

  • Node.js installed in your machine
  • A registered Twitter account

Create a Twitter application

@debashisbarman
debashisbarman / First Come First Serve Simulation
Created Aug 31, 2014
This is a simple C program to simulate the first come first serve scheduling. The purpose of this program is to calculate the waiting time, average waiting time and turn around time for a user input process queue.
View First Come First Serve Simulation
/* =========================================================================
* First Come First Serve Scheduling
*
* DESCRIPTION
* ===========
* This is a simple C program to simulate the first come first serve
* scheduling. The purpose of this program is to calculate the waiting time,
* average waiting time and turn around time for a user input process queue.
*
* =========================================================================