Skip to content

Instantly share code, notes, and snippets.

View ishandutta2007's full-sized avatar
🎓
I may be slow to respond.

ishan dutta ishandutta2007

🎓
I may be slow to respond.
View GitHub Profile
var likers = []
var as = document.getElementsByClassName("social-details-reactors-tab-body__profile-link")
for (var i=0;i< as.length;i++){
h = as[i].getAttribute('href').split('?')[0];
likers.push(h)
}
copy(likers)
╔══════════════╦══════════════╦══════════════════╦═════════════╗
║ Company ║ Country ║ Goal ║ Focus ║
╠══════════════╬══════════════╬══════════════════╬═════════════╣
║ SpaceX ║ US ║ Mars ║ ║
║ Boeing ║ US ║ 111 ║ ║
║ Blue Origin ║ US ║ Space Hotel ║ ║
╚══════════════╩══════════════╩══════════════════╩═════════════╝
@ishandutta2007
ishandutta2007 / gist:dd38c159db771435924923ce6497c005
Created November 14, 2019 03:19 — forked from utsengar/gist:1329947
Object dump using gobjdump on Mac OSX
1. Write a hello hello world c
main( )
{
printf("Hello World\n");
}
2. Compile it: gcc hello.c
Bonus: `gcc -Wall -save-temps hello.c -o hello` will give you extra stuff like:
@ishandutta2007
ishandutta2007 / gist:dfd17b595de175308cf491bdc32f2238
Created November 14, 2019 03:19 — forked from utsengar/gist:1329947
Object dump using gobjdump on Mac OSX
1. Write a hello hello world c
main( )
{
printf("Hello World\n");
}
2. Compile it: gcc hello.c
Bonus: `gcc -Wall -save-temps hello.c -o hello` will give you extra stuff like:
<html lang="en" class="js logged-in client-root"><script type="text/javascript">Object.defineProperty(window.navigator, "userAgent", { get: function(){ return "Mozilla/5.0 (iPhone; CPU iPhone OS 6_0 like Mac OS X) AppleWebKit/536.26 (KHTML, like Gecko) Version/6.0 Mobile/10A5376e Safari/8536.25"; } });Object.defineProperty(window.navigator, "vendor", { get: function(){ return "Apple, Inc."; } });Object.defineProperty(window.navigator, "platform", { get: function(){ return "iPhone"; } });Object.defineProperty(window.screen.orientation, 'type', {value: 'portrait-primary'});</script><head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Instagram</title>
<meta name="robots" content="noimageindex, noarchive">
<meta name="mobile-web-app-capable" content="yes">
<meta name="theme-color" content="#000000">
// flattenArray([[1,2,[3]],4]) // [1, 2, 3 , 4]
function flattenArray (input) {
if (Array.isArray(input)) {
return input.reduce(
function flattener (accumulator, value) {
if (Array.isArray(value)) {
return accumulator.concat(value.reduce(flattener, []))
} else {
return accumulator.concat(value)
https://github.com/search?o=desc&q=fork%3Afalse+user%3Aishandutta2007&s=updated&type=Repositories
@ishandutta2007
ishandutta2007 / merge_subtitles_with_video.py
Created March 2, 2017 10:53 — forked from altermarkive/merge_subtitles_with_video.py
Python script for merging video files (AVI, MP4, MKV) with subtitles (SRT) using ffmpeg (on Windows it will also handle font configuration)
# Have you ever saw this error while trying to merge/embed subtitles
# into a video file on Windows?
#
# Fontconfig error: Cannot load default config file
# [Parsed_subtitles_0 @ 0000000002bf1ee0] No usable fontconfig configuration # file
# found, using fallback.
# Fontconfig error: Cannot load default config file
#
# This scripts merges subtitles (if present) and transcodes video files
# to H.264 mp4 video files with similar quality level.
# coding=UTF-8
from __future__ import division
import re
# This is a naive text summarization algorithm
# Created by Shlomi Babluki
# April, 2013
class SummaryTool(object):
#!/bin/sh
#
# This script will make WinMerge your default tool for diff and merge.
# It must run inside git bash (on Windows)
#
#
# If you experience path issues you should give a try to the gist
# created by markusobrist at https://gist.github.com/1010253