Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯

Sudhir Pradhan sudhir-pradhan

🎯
View GitHub Profile
@sudhir-pradhan
sudhir-pradhan / delete-likes-from-twitter.md
Created Apr 17, 2021 — forked from aymericbeaumet/delete-likes-from-twitter.md
[Recipe] Delete all your likes/favorites from Twitter
View delete-likes-from-twitter.md

Ever wanted to delete all your likes/favorites from Twitter but only found broken/expensive tools? You are in the right place.

  1. Go to: https://twitter.com/{username}/likes
  2. Open the console and run the following JavaScript code:
setInterval(() => {
  for (const d of document.querySelectorAll('div[data-testid="unlike"]')) {
    d.click()
  }
@sudhir-pradhan
sudhir-pradhan / phoneAuth.js
Created Dec 29, 2020 — forked from nyx-code/phoneAuth.js
This is the code for creating simple phone authentication REST API using Twilio service.
View phoneAuth.js
require('dotenv/config')
const express = require('express')
const app = express()
const port = 3000
const client = require('twilio')(process.env.ACCOUNT_SID, process.env.AUTH_TOKEN)
// /login
// - phone number
View folder-structure.md

Folder Structure

Motivations

  • Clear feature ownership
  • Module usage predictibility (refactoring, maintainence, you know what's shared, what's not, prevents accidental regressions, avoids huge directories of not-actually-reusable modules, etc)
@sudhir-pradhan
sudhir-pradhan / index.js
Created May 29, 2020 — forked from akexorcist/index.js
Axios post method requesting with x-www-form-urlencoded content type
View index.js
const axios = require('axios')
const qs = require('querystring')
...
const requestBody = {
name: 'Akexorcist',
age: '28',
position: 'Android Developer',
description: 'birthdate=25-12-1989&favourite=coding%20coding%20and%20coding&company=Nextzy%20Technologies&website=http://www.akexorcist.com/',
@sudhir-pradhan
sudhir-pradhan / timeout.html
Created May 11, 2020 — forked from kumikoda/timeout.html
A simple example demonstrating how setTimeout(fn, 0) can be useful. This gist illustrates the answer given by DVK's on stackoverflow. http://stackoverflow.com/a/4575011/783478
View timeout.html
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<button id='do'> Do long calc!</button>
<div id='status'></div>
<div id='result'></div>
<script>
$('#do').on('click', function(){
@sudhir-pradhan
sudhir-pradhan / gist:13f00584698f5d1833a3739ba21a9b09
Created Apr 25, 2020 — forked from digitaljhelms/gist:4287848
Git/GitHub branching standards & conventions
View gist:13f00584698f5d1833a3739ba21a9b09

Branching

Quick Legend

Instance Branch Description, Instructions, Notes
@sudhir-pradhan
sudhir-pradhan / antd_sc_example.js
Created Feb 14, 2020 — forked from newswim/antd_sc_example.js
Wrapping Ant Design components with Styled Components
View antd_sc_example.js
import { Link } from 'react-router-dom'
import { Badge, Col, Menu } from 'antd'
const StyledBadge = styled(Badge)`
.ant-badge-count {
background-color: #7ECBBF;
color: white;
box-shadow: 0 0 0 1px #d9d9d9 inset;
}
`
@sudhir-pradhan
sudhir-pradhan / client.html
Created Jan 25, 2020 — forked from agrueneberg/client.html
HMAC-SHA256 example for verifying both the data integrity and the authentication of a request in Node.js and web browsers.
View client.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>HMAC-SHA256 Example</title>
</head>
<body>
<script src="http://crypto.stanford.edu/sjcl/sjcl.js"></script>
<script>
var sharedSecret, query, signature, hmac, xhr;
View reset.css
/* http://meyerweb.com/eric/tools/css/reset/
v2.0-modified | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
@sudhir-pradhan
sudhir-pradhan / node-folder-structure-options.md
Created Sep 26, 2019 — forked from lancejpollard/node-folder-structure-options.md
What is your folder-structure preference for a large-scale Node.js project?
View node-folder-structure-options.md

What is your folder-structure preference for a large-scale Node.js project?

0: Starting from Rails

This is the reference point. All the other options are based off this.

|-- app
|   |-- controllers
|   |   |-- admin