- Fundamental's of NodeJS.
- Basic understanding of eventloop.
- Basics of ES6.
- Working of REST api's.
- How to play CHESS game.
- Login to https://web.telegram.org
- Copy-paste contents of
telegram-scripts.js
into JS console - Run
showContacts()
to get the list of contacts with ids - Run
saveChat(userId)
whereuserId
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, {Component} from "react"; | |
import { | |
Dimensions, | |
Image, | |
Keyboard, | |
Modal, | |
Platform, | |
ScrollView, | |
StyleSheet, | |
Text, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var target = { | |
foo: { | |
bar: { | |
baz: [ | |
'madness' | |
] | |
} | |
} | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* version1: convert online image | |
* @param {String} url | |
* @param {Function} callback | |
* @param {String} [outputFormat='image/png'] | |
* @author HaNdTriX | |
* @example | |
convertImgToBase64('http://goo.gl/AOxHAL', function(base64Img){ | |
console.log('IMAGE:',base64Img); | |
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this is the background code... | |
// listen for our browerAction to be clicked | |
chrome.browserAction.onClicked.addListener(function (tab) { | |
// for the current tab, inject the "inject.js" file & execute it | |
chrome.tabs.executeScript(tab.ib, { | |
file: 'inject.js' | |
}); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# First install tmux | |
brew install tmux | |
# For mouse support (for switching panes and windows) | |
# Only needed if you are using Terminal.app (iTerm has mouse support) | |
Install http://www.culater.net/software/SIMBL/SIMBL.php | |
Then install https://bitheap.org/mouseterm/ | |
# More on mouse support http://floriancrouzat.net/2010/07/run-tmux-with-mouse-support-in-mac-os-x-terminal-app/ |