Skip to content

Instantly share code, notes, and snippets.

View bozzmob's full-sized avatar
😎
Work In Progress

Satvik bozzmob

😎
Work In Progress
  • CISCO
  • India
View GitHub Profile
"hello":{
"a":"123",
"b":"3214",
"total":[2,4,5,7,8,423]
}
@bozzmob
bozzmob / gist:67ffeffc451774a947a20bb1946b4964
Created April 16, 2019 17:08 — forked from nkint/gist:8576156
opencv and python: concatenate video
import numpy as np
import cv2
import os
# this two lines are for loading the videos.
# in this case the video are named as: cut1.mp4, cut2.mp4, ..., cut15.mp4
videofiles = [n for n in os.listdir('.') if n[0]=='c' and n[-4:]=='.mp4']
videofiles = sorted(videofiles, key=lambda item: int( item.partition('.')[0][3:]))
video_index = 0
@bozzmob
bozzmob / JoinMP4.py
Created April 16, 2019 17:04 — forked from rohitrangan/JoinMP4.py
Combining multiple mp4's to become a single mp4.
#!/usr/bin/env python
import sys
import time
from subprocess import check_output
for i in range(1, len(sys.argv)):
print sys.argv[i],
fname = "Part" + str(i) + ".mpg"
print fname
@bozzmob
bozzmob / 0.README.md
Created April 18, 2018 11:43 — forked from agentcooper/0.README.md
Telegram chat backup/export

How to use

  1. Login to https://web.telegram.org
  2. Copy-paste contents of telegram-scripts.js into JS console
  3. Run showContacts() to get the list of contacts with ids
  4. Run saveChat(userId) where userId is the id from step 3

Process can take a while, check console for progress. Occasionall FLOOD_WAIT errors are expected. Once done, browser will download the JSON file.

Motivation

@bozzmob
bozzmob / promise.js
Created January 31, 2017 07:29 — forked from jish/promise.js
An example "always" behavior for ES6 promises. This only works if you do not create / return intermediate promises.
// A thing I want to do
// This flow only involves **one** promise, for example an ajax call
// None of the subsequent `then` or `catch` calls, return new promises.
var explode = false;
var promise = new Promise(function(resolve, reject) {
if (explode) {
@bozzmob
bozzmob / home.js
Created October 16, 2016 14:54 — forked from melihmucuk/home.js
react native animate listview rows while scrolling
import React, { Component } from 'react';
import {
StyleSheet,
View,
Text,
ListView
} from 'react-native';
import Icon from 'react-native-vector-icons/FontAwesome';
import * as Animatable from 'react-native-animatable';
require("babel-core/register");
require("babel-polyfill");
(async function testingAsyncAwait() {
await console.log("For Trump's Sake Print me!");
})();
(async function testingAsyncAwait() {
await console.log("For Trump's Sake Print me!");
})();
@bozzmob
bozzmob / Changing GIT commit Date
Created January 20, 2016 18:51
Changing GIT commit Date
git filter-branch --env-filter \
'if [ $GIT_COMMIT = c4383ad4380ff73c088cb9561e72e3cf3598fdf0 ]
then
export GIT_AUTHOR_DATE="Wed Jan 20 21:38:53 2016 +0530"
export GIT_COMMITTER_DATE="Wed Jan 20 21:38:53 2016 +0530"
fi'