Skip to content

Instantly share code, notes, and snippets.

baptx

Block or report user

Report or block baptx

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@baptx
baptx / instagram-api_direct_messages_backup.js
Last active Oct 14, 2019
Instagram API: view and backup direct messages from a web browser
View instagram-api_direct_messages_backup.js
/*
Instagram API: view and backup direct messages from a web browser
1) Log in on Instagram web version and go to your profile page
(the home page will not work because it loads data when scrolling down and the direct messages will be displayed at the bottom of the page)
2) Modify HTTP headers with a browser addon like Header Editor (https://addons.mozilla.org/en-US/firefox/addon/header-editor/)
Content-Security-Policy (response header on domain www.instagram.com): original data with https://i.instagram.com/ added to connect-src
report-uri https://www.instagram.com/security/csp_report/; default-src 'self' https://www.instagram.com; img-src https: data: blob:; font-src https: data:; media-src 'self' blob: https://www.instagram.com https://*.cdninstagram.com https://*.fbcdn.net; manifest-src 'self' https://www.instagram.com; script-src 'self' https://instagram.com https://www.instagram.com https://*.www.instagram.com https://*.cdninstagram.com wss://www.instagram.com https://*.facebook.com https://*.fbcdn.ne
@baptx
baptx / facebook_graph_api.js
Last active Apr 30, 2018
Facebook Graph API groups members intersection
View facebook_graph_api.js
/*
* config
*/
var token = "XXX";
var limit = 5000;
var id1 = "XXX";
var id2 = "XXX";
@baptx
baptx / francetv_get_m3u8.user.js
Last active Apr 30, 2018
Get M3U8 streaming URL from France TV info replay website
View francetv_get_m3u8.user.js
// ==UserScript==
// @name get_m3u8
// @namespace francetvinfo
// @include http://www.francetvinfo.fr/*
// @version 1
// @grant none
// ==/UserScript==
/* Using Content Script Injection (window.functionName) to make function available outside GreaseMonkey scope
Page reload is needed if using existing function _jsonp_loader_callback_request_0. */
@baptx
baptx / 2letters_domains_available.node.js
Last active Apr 30, 2018
List available 2 letters domain names in JavaScript using Node.js / JXcore
View 2letters_domains_available.node.js
var https = require("https");
var fs = require("fs");
var ws = fs.createWriteStream("2letters_domains_available.txt");
var domain = "aa.lc"; // format: aa.tld
var numbers = false; // include numbers
function apiParse(body)
{
var status = JSON.parse(body)[0].available;
@baptx
baptx / twitter_api_1.1_backup.js
Last active Nov 23, 2019
Twitter API 1.1 favorites/following/followers backup
View twitter_api_1.1_backup.js
/* Twitter API 1.1 favorites/following/followers backup (a textarea will appear so you can copy/paste to save data).
** Get your access keys to use Twitter API 1.1: https://dev.twitter.com/docs/auth/tokens-devtwittercom
** Format JSON in Firefox: https://addons.mozilla.org/EN-us/firefox/addon/jsonview/
** You can change Twitter API URL and Twitter screen_name, then execute script from a trusted web page without CSP protection like about:blank in Firefox Scratchpad or any other browser console.
*/
var url = "https://api.twitter.com/1.1/favorites/list.json";
//var url = "https://api.twitter.com/1.1/friends/list.json";
//var url = "https://api.twitter.com/1.1/followers/list.json";
@baptx
baptx / twitter_api_1.1.js
Last active Oct 27, 2018
Access Twitter API 1.1 in browser
View twitter_api_1.1.js
/* Access Twitter API 1.1 in browser.
** Get your access keys to use Twitter API 1.1: https://dev.twitter.com/docs/auth/tokens-devtwittercom
** Format JSON in Firefox: https://addons.mozilla.org/EN-us/firefox/addon/jsonview/
** You can change Twitter API URL and Twitter screen_name, then execute script from a trusted web page without CSP protection like about:blank in Firefox Scratchpad or any other browser console.
*/
var script = document.createElement("script");
script.setAttribute("src", "https://pastebin.com/raw/HFjqYLdG"); // http://oauth.googlecode.com/svn/code/javascript/oauth.js (down)
document.body.appendChild(script);
@baptx
baptx / copy_folder_by_filename.sh
Created Oct 12, 2014
Copy folder by filename
View copy_folder_by_filename.sh
IFS=$'\n'
if [ $# == 2 ]; then
if [ ! -d $1 ]; then
echo "Error: directory $1 does not exist"
else
dir=$1
len=$((${#dir} + 1))
if [ ! -d $2 ]; then
mkdir $2
fi
@baptx
baptx / remame_by_playlist_index.sh
Created Oct 12, 2014
Rename by playlist index
View remame_by_playlist_index.sh
IFS=$'\n'
if [ $# -gt 0 ]; then
if [ ! -f $1 ]; then
echo "Error: file $1 does not exist"
exit
fi
path=`echo $1 | rev | cut -d / -f 2- | rev`
if [ $path == $1 ]; then
path=$PWD
fi
@baptx
baptx / amazon_mp3_multiple_download.user.js
Created Oct 12, 2014
Amazon MP3 multiple download (Amazon Cloud Player for Web)
View amazon_mp3_multiple_download.user.js
// ==UserScript==
// @name amazon_mp3_multiple_download
// @namespace amazon
// @description Download all songs in current playlist
// @include https://www.amazon.*/gp/dmusic/mp3/player*
// @version 1
// @grant none
// ==/UserScript==
setTimeout(function() {
@baptx
baptx / twitter_timeline_update.js
Created Oct 12, 2014
Twitter timeline update
View twitter_timeline_update.js
var target_tweet = document.getElementsByClassName("stream-container")[0];
var observer = new MutationObserver(function(mutations) {
for (var i = 0; mutations[i]; i++)
document.getElementsByClassName("new-tweets-bar")[0].click();
});
var config = { attributes: true, childList: true, characterData: true }
observer.observe(target_tweet, config);
You can’t perform that action at this time.