Skip to content

Instantly share code, notes, and snippets.

View linglung's full-sized avatar

linglung

  • C+ Java
View GitHub Profile
@yume-yu
yume-yu / CardStyleView_inGoogleResult.user.js
Last active June 20, 2019 09:40
Card style View in Google result for Tampermonkey
// ==UserScript==
// @name Card style View in Google result
// @namespace https://twitter.com/yume_yu
// @homepage https://github.com/yume-yu/CardStyleView-in-GoogleResult
// @supportURL https://twitter.com/yume_yu
// @version 0.5
// @description This scripts add cardView to your GoogleSearchResult.
// @author @yume_yu
// @match https://www.google.com/search*
// @match https://www.google.co.jp/search*
@tanaikech
tanaikech / submit.md
Last active July 26, 2023 17:00
Benchmark: Loop for Array Processing using Google Apps Script without V8

Benchmark: Loop for Array Processing using Google Apps Script without V8

April 16, 2018 Published.

July 26, 2018 Updated. Result of reduce was added.

@SamuelGee
SamuelGee / binance.php
Created February 4, 2018 17:31
Binance get historical data
<?
header("Content-type: text/html; charset=utf-8");
//get list of symbols
$xinfo = json_decode(file_get_contents("https://api.binance.com/api/v1/exchangeInfo"), true);
$symbols = [];
foreach($xinfo["symbols"] as $sym) $symbols[] = $sym["symbol"];
asort($symbols);
@codeninja
codeninja / openOrderMonitor.js
Last active May 23, 2023 05:57
Node JS Script to check Binance for open orders and notify when they are filled.
//this script will monitor for all pairs and find any open orders for that pair.
// I've done my best to account for throttling and make the script robust.
// save locally, add your api key, and run with "node <script name>" in console.
// You'll get alerted (in console) when an order fills.
// if you'd like to send a donation my way:
// BTC: 1JD595vphvXmWEwpjiUmfw3QzsBtE9jUP7
// LTC: LcaHE2dqrH73xLtoKXwDZEUtDiY42iAvk4
// ETH: 0x110191093ffab1f0d3d6012cc0de15f42257b7f6
// BNB: 0x110191093ffab1f0d3d6012cc0de15f42257b7f6
// codeninja@gmail.com for questions... I'll do my best to support the script if you find any bugs.
@micdenny
micdenny / iframe-tracker.component.html
Last active May 29, 2024 07:58
How to detect a click event on a cross domain iframe (iframe.tracker)
<div>
<iframe appIframeTracker (iframeClick)="onIframeClick()" src="http://www.google.com"></iframe>
</div>
@tanaikech
tanaikech / submit.md
Last active January 14, 2023 19:32
Binance API for Google Apps Script

Binance API for Google Apps Script

This sample script is for using Binance API by Google Apps Script. This script encryptes "signature" like samples. In this script, "Example 1: As a query string" is used, and it retrieves "All orders (SIGNED)" by "GET".

function main() {
    var key = '#####'; // Please input your key.
    var secret = '#####'; // Please input your secret.
    var api = "/api/v3/allOrders"; // Please input API Endpoint you want.
    var timestamp = Number(new Date().getTime()).toFixed(0);
 var string = "symbol=LTCBTC&amp;timestamp=" + timestamp; // Please input query parameters for the inputterd API.
@sammchardy
sammchardy / convert-binance-interval-to-milliseconds.py
Last active April 26, 2019 07:51
Convert Binance interval to milliseconds
def interval_to_milliseconds(interval):
"""Convert a Binance interval string to milliseconds
:param interval: Binance interval string 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w
:type interval: str
:return:
None if unit not one of m, h, d or w
None if string not in correct format
int value of interval in milliseconds
@unnikked
unnikked / README.md
Last active February 19, 2024 02:58
How to host your Telegram bot on Google App Script

Telegram Bot on Google App Script

This is the source code of one of my blog post. To read the full blog post please click here.

@jalcantarab
jalcantarab / _jsonPuller.md
Last active June 3, 2024 10:49 — forked from crstamps2/jsonPuller
A Google apps script to pull json from a spreadsheet

JSON Puller - Google Apps Script

Transforms the data of a given Spreadsheet Sheet to JSON.

  • The frozen rows are taken as keys for the JSON.
  • The data taken for the values is only that after the frozen rows

Set up:

exportJSON(Spreadsheet) - transforms the data in the given sheet to JSON.

// import_json_appsscript.js
// https://gist.github.com/allenyllee/c764c86ed722417948fc256b7a5077c4
//
// Changelog:
// (Oct. 16 2019) tag: allenyllee-20191016
// 1. Fixed google script error: urlfetchapp - service invoked too many times https://stackoverflow.com/questions/10598179/google-apps-script-urlfetchapp-service-invoked-too-many-times
// (Jul. 16 2018) tag: allenyllee-20180716
// 1. Fixed the issue "If you try to query /arrayA[k]/arrayB[n]/arrayC[m]/.../member, you will always get /arrayA[k]/arrayB[k]/arrayC[k]/.../member."
// (Nov. 30 2017) tag: allenyllee-20171130
// 1. Add the ability to query array elements by using xpath like "/array[n]/member" where "n" is array index