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
""" | |
Simple Moving Average implemented using KiteConnect Python library. -- [https://kite.trade](kite.trade) | |
Rainmatter (c) 2016 | |
License | |
------- | |
This GIST is licensed under the MIT License | |
""" | |
from kiteconnect import KiteConnect |
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
// ==UserScript== | |
// @name HoloTools Fixes and Enhancements | |
// @namespace https://gist.github.com/lbmaian/fef815da2628dc6e546ba1f7cd8212a5 | |
// @version 0.2 | |
// @description Fixes for HoloTools | |
// @author lbmaian | |
// @match https://hololive.jetri.co/ | |
// @icon https://hololive.jetri.co/favicon-fbk.png | |
// @run-at document-start | |
// @grant none |
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
// Taken from https://stackoverflow.com/a/27363569 | |
// Allows for the object to be interrogated | |
((() => { | |
const origOpen = XMLHttpRequest.prototype.open; | |
XMLHttpRequest.prototype.open = function() { | |
console.log('request started!'); | |
this.addEventListener('load', function() { | |
console.log('request completed!'); | |
console.log(this.readyState); //will always be 4 (ajax is completed successfully) |
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
function interceptNetworkRequests(ee) { | |
const open = XMLHttpRequest.prototype.open; | |
const send = XMLHttpRequest.prototype.send; | |
const isRegularXHR = open.toString().indexOf('native code') !== -1; | |
// don't hijack if already hijacked - this will mess up with frameworks like Angular with zones | |
// we work if we load first there which we can. | |
if (isRegularXHR) { |
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
/* Intercept XMLHttpRequests */ | |
(function(open) { | |
XMLHttpRequest.prototype.open = function() { | |
this.addEventListener("readystatechange", function() { | |
console.log("readyState: "+this.readyState); | |
}, false); | |
open.apply(this, arguments); | |
}; | |
})(XMLHttpRequest.prototype.open); |
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
// ==UserScript== | |
// @name xhr-intercept | |
// @namespace https://github.com/BiasHacker | |
// @version 0.1 | |
// @description XMLHttpRequestを仲介します。 | |
// @author Sin | |
// @match https://hoge.com/* | |
// @grant none | |
// @run-at document-start | |
// ==/UserScript== |
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
use futures::StreamExt; | |
use std::error::Error; | |
use tokio; | |
use tokio::macros::support::Pin; | |
use tokio::prelude::*; | |
use tokio::time::{Duration, Instant}; | |
pub fn main() -> Result<(), Box<dyn std::error::Error>> { | |
let mut multi_threaded_runtime = tokio::runtime::Builder::new() | |
.threaded_scheduler() |
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
// you need this in your cargo.toml | |
// reqwest = { version = "0.11.3", features = ["stream"] } | |
// futures-util = "0.3.14" | |
// indicatif = "0.15.0" | |
use std::cmp::min; | |
use std::fs::File; | |
use std::io::Write; | |
use reqwest::Client; | |
use indicatif::{ProgressBar, ProgressStyle}; |
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 http = require("http"); | |
http.createServer().listen(8080); | |
loginAndStartSocket(); | |
async function loginAndStartSocket() { | |
// XTS Objects from library | |
const XtsMarketDataAPI = require("xts-marketdata-api").XtsMarketDataAPI; | |
const XtsMarketDataWS = require("xts-marketdata-api").WS; | |
// JSON file containing appSecret & appKey | |
const secrets = require("./secrets/iiflBlaze.json"); |
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
https://code.google.com/p/android/issues/detail?id=32696#c5 | |
If you have a certificate that is not | |
trusted by Android, when you add it, it goes in the personal cert store. | |
When you add a cert in this personal cert store, the system requires a | |
higher security level to unlock the device. But if you manage to add your | |
cert to the system store then you don't have this requirement. Obviously, | |
root is required to add a certificate to the system store, but it is quiet | |
easy. |