Skip to content

Instantly share code, notes, and snippets.

Script for trimming video in ubuntu

ffmpeg -ss 00:00:00 -t 00:01:16 -i input.mp4 -vcodec copy -acodec copy output.mp4 

Time format: hh:mm:ss

Github Copilot Interaction

What is happening below?

  1. Installed Copilot on VS Code
  2. Wrote the function name for e.g., function add() {
  3. Copilot suggests code, I simply press Tab :O

Tinder Automation

Why?

Want to save time right swiping on profiles? This script will help

How?

  1. Go to tinder.com, login
  2. Open the console
  3. Paste the script below
@nishantrpai
nishantrpai / audio.md
Last active June 3, 2021 13:44
Fix Audio Output Issues For Ubuntu

Fix Audio Output Issues For Ubuntu

Note: Play a song before and after the process to understand the difference.

  • sudo cp /etc/pulse/daemon.conf /etc/pulse/daemon.conf.backup
  • sudo nano /etc/pulse/daemon.conf

Change key values

default-sample-format = float32ne
@nishantrpai
nishantrpai / Free Disk Space Ubuntu.md
Last active May 11, 2021 05:40
Ubuntu 18 has a problem with disk space that I keep running into. This script should help solve that problem.
@nishantrpai
nishantrpai / twitter-unfollow.md
Last active September 10, 2023 14:49
Script to unfollow everyone on Twitter
// For time series data
let d = new Date();
let ye = new Intl.DateTimeFormat('en', { year: 'numeric' }).format(d);
let mo = new Intl.DateTimeFormat('en', { month: 'short' }).format(d);
let da = new Intl.DateTimeFormat('en', { day: '2-digit' }).format(d);
let hh = new Intl.DateTimeFormat('en', { hour: 'numeric', hour12: false }).format(d);
let mm = parseInt(new Intl.DateTimeFormat('en', { minute: 'numeric' }).format(d));
mm = mm > 9 ? mm : `0${mm}`
let ss = parseInt(new Intl.DateTimeFormat('en', { second: 'numeric', hour12: false }).format(d));
@nishantrpai
nishantrpai / seo.md
Created December 23, 2020 13:04
SEO That Works Notes

Linkreators

  1. use Google to find them
    • search should be informational keywords which brings up new sites and blogs
    • find around 10 linkreators per keyword
  2. use backlink analysis to see how links to the linkreators
  3. check out best of list:
    • [keyword] blogs to follow
    • best [keyword] blogs
    • best [keyword] posts [year]
  • top [keyword] blogs to follow + [year]
@nishantrpai
nishantrpai / startup.js
Last active August 26, 2020 05:10
Source code for building a startup
// Assumption this is only for a SaaS startup.
// Startup is just a project/asset delivers an outcome for a specific customer(s ideally).
//hypothesis = Delivering *outcome* for *possible customer* would create
//this process usually has discovery and validation, but seldom is discovery mentioned anywhere.
//discovery adds possible customer segments from the market.
//outcome is very specific for eg; The outcome a car delivers: Minimize the time to reach from A to B.
//outcome maximizes/minimizes a certain entity. In the case of car it was time. This has to be figured out first.
const research = () => {

Linkedin is a great platform to network and meet people.

Unfortunately opinionated discussion tend to take over a lot of engagment and insights take a back seat.

These are the following instructions to make linkedin feed work for you

PS: Use chrome to make sure this works.

  1. Go to https://www.linkedin.com/feed/following/