Skip to content

Instantly share code, notes, and snippets.

View ltomaszewski's full-sized avatar

Łukasz Tomaszewski ltomaszewski

View GitHub Profile
@ltomaszewski
ltomaszewski / yfinance1.js
Created November 2, 2023 13:31 — forked from vmetnev/yfinance1.js
Working Yahoo Finance
getData()
async function getData() {
let response = await fetch('https://69.147.92.11/v6/finance/quoteSummary/XOM?modules=summaryDetail&ssl=true', {
headers: {
'Host': 'query2.finance.yahoo.com'
}
});
let json = await response.json()
[
{
"action": {
"type": "block"
},
"trigger": {
"url-filter": ".*",
"resource-type": ["script"],
"load-type": ["third-party"],
"if-domain": ["imore.com"]
// Just before switching jobs:
// Add one of these.
// Preferably into the same commit where you do a large merge.
//
// This started as a tweet with a joke of "C++ pro-tip: #define private public",
// and then it quickly escalated into more and more evil suggestions.
// I've tried to capture interesting suggestions here.
//
// Contributors: @r2d2rigo, @joeldevahl, @msinilo, @_Humus_,
// @YuriyODonnell, @rygorous, @cmuratori, @mike_acton, @grumpygiant,
// add child view
UIViewController* controller = [self.storyboard instantiateViewControllerWithIdentifier:@"test"];
[self addChildViewController:controller];
controller.view.frame = CGRectMake(0, 44, 320, 320);
[self.view addSubview:controller.view];
[controller didMoveToParentViewController:self];
// remove child view
UIViewController *vc = [self.childViewControllers lastObject];
[vc.view removeFromSuperview];
@ltomaszewski
ltomaszewski / gist:3804939
Created September 29, 2012 19:06 — forked from christopherobin/gist:2396722
Functionnal MtGox client written in Java
package com.mtgox.api;
import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.crypto.Mac;