Skip to content

Instantly share code, notes, and snippets.

View platelminto's full-sized avatar

Giorgio Momigliano platelminto

  • Recent AI Grad (hire me?)
  • Utrecht
View GitHub Profile
@platelminto
platelminto / snoop.md
Created September 28, 2024 00:00
Android app network request snooping

Android App Network Request Snooping Guide

Prerequisites

  1. Charles Proxy
  2. Android Studio
  3. ADB (Android Debug Bridge)

Step 1: Set up Charles Proxy

  1. Install Charles Proxy (free trial has pop-ups but is usable).
  2. Enable SSL proxying:
use std::fmt::{Display, Formatter, Result};
use crate::linked_list::List::{Cons, Nil};
#[derive(Debug)]
enum List {
Cons(u32, Box<List>),
Nil,
}
impl Display for List {
@platelminto
platelminto / numbers.txt
Created December 11, 2018 02:06
Number of Google results for the numbers 0-100, in billions
0,25.27
1,25.27
2,25.27
3,25.27
4,25.27
5,25.27
6,25.27
7,25.27
8,25.27
9,25.27
@platelminto
platelminto / ResultsForIntegers.java
Created December 11, 2018 01:55
Get number of Google results for integers from 0 to a given amount
import com.gargoylesoftware.htmlunit.WebClient;
import com.gargoylesoftware.htmlunit.WebResponse;
import java.io.File;
import java.io.IOException;
import java.io.PrintWriter;
public class ResultsForIntegers {
private static final int INTEGER_NUMBER = 5;
@platelminto
platelminto / wired_extracted.html
Created November 8, 2018 17:21
Crux extraction of wired article
<p><p>Max Krause was </p>thinking of buying some bitcoin, as one does. But Krause is an engineer—mostly he works on modeling greenhouse gas emissions from landfills—so his first step was to run the numbers. He looked at price, of course, but also how fast the world’s bitcoin miners create new bitcoins and the ledger that accounts for them. And he looked at how much electricity that would seem to require.</p>
<p>“I thought, man, this is a lot of energy,” Krause says. “I thought, it can’t be true that people are using this much energy. But it is.”</p>
<p>Krause’s calculations aren’t just back-of-the-envelope noodling, cryptocurrency blog trolling, or white-paper crossfire. His calculations of how much energy—and planet-warming carbon emissions—the top four cryptocurrencies might be responsible for appears in an <a href="https://www.nature.com/articles/s41893-018-0152-7">article</a> in the journal <em>Nature Sustainability</em> today, joining a growing canon of peer-reviewed and rigorous work trying to put numb
import java.util.Scanner;
import java.math.BigInteger;
public class Factorial {
@SuppressWarnings("resource")
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
System.out.println("Find factorial of: ");
BigInteger n = new BigInteger(scan.nextLine());