Skip to content

Instantly share code, notes, and snippets.

View johncrisostomo's full-sized avatar
🌏
Not much contrib here as my org is now using a ADO exclusively

John Crisostomo johncrisostomo

🌏
Not much contrib here as my org is now using a ADO exclusively
  • JLL Technologies
  • Singapore
View GitHub Profile
@lemariva
lemariva / 1-README.md
Last active January 7, 2022 22:07 — forked from ruario/1-README.md
A script that fetches a ChromeOS image for ARM32 and extracts the Widevine and Flash binaries, saving them in a compressed archive for use with Chromium for DRM

The included script 'widevine-flash_armhf.sh' fetches a ChromeOS image for ARM and extracts the Widevine and Flash binaries, saving them in a compressed archive. Since it downloads a fairly large file (2Gb+ on disk after download) it is recommended that you run the script on a raspberry that has plenty of disk space.

The files in the compressed archive are copied to the folder /usr/lib/chromium-browser/ To run the file just type the following:

sudo ./widevine-flash_armhf.sh

Check out this tutorial: https://lemariva.com/blog/2020/06/raspberry-pi-amazon-prime-netflix-and-drm-solution

@ruario
ruario / 1-README.md
Last active February 7, 2024 18:46
A script that fetches a ChromeOS image for ARM32 and extracts the Widevine binary, saving it in a compressed archive for use with Vivaldi

The included script 'widevine-flash_armhf.sh' fetches a ChromeOS image for ARM and extracts the Widevine binary, saving it in a compressed archive. Since it downloads a fairly large file (2Gb+ on disk after download) it is recommended that you run the script on a machine that has plenty of disk space.

To install the resultant archive, issue the following on your ARM machine–after copying over the archive if needed:

sudo tar Cfx / widevine-flash-20200124_armhf.tgz

(Where 'widevine-flash-20200124_armhf.tgz' is updated to reflect the actual name of the created archive)

@gaearon
gaearon / index.html
Last active January 26, 2024 11:25
Add React in One Minute
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Add React in One Minute</title>
</head>
<body>
<h2>Add React in One Minute</h2>
<p>This page demonstrates using React with no build tooling.</p>
@tomdean
tomdean / bulk.py
Last active September 9, 2023 23:56
from collections import OrderedDict
import datetime
from typing import Iterator, List, Sized, Union
import numpy as np
import pandas as pd
from psycopg2.extensions import QuotedString
from sqlalchemy import and_, exists, MetaData, Table, Column as SAColumn
import logging
@spaze
spaze / opera-vpn.md
Last active April 20, 2024 02:14
Opera VPN behind the curtains is just a proxy, here's how it works

2023 update

ℹ️ Please note this research is from 2016 when Opera has first added their browser "VPN", even before the "Chinese deal" was closed. They have since introduced some real VPN apps but this below is not about them.

🕵️ Some folks also like to use this article to show a proof that the Opera browser is a spyware or that Opera sells all your data to 3rd parties or something like that. This article here doesn't say anything like that.


When setting up (that's immediately when user enables it in settings) Opera VPN sends few API requests to https://api.surfeasy.com to obtain credentials and proxy IPs, see below, also see The Oprah Proxy.

The browser then talks to a proxy de0.opera-proxy.net (when VPN location is set to Germany), it's IP address can only be resolved from within Opera when VPN is on, it's 185.108.219.42 (or similar, see below). It's an HTTP/S proxy which requires auth.

@longhotsummer
longhotsummer / leaflet-big-image-full.html
Created April 5, 2016 06:47
Full example of using leaflet to pan and zoom a big image, as described at http://kempe.net/blog/2014/06/14/leaflet-pan-zoom-image.html
<html>
<!-- See also: http://kempe.net/blog/2014/06/14/leaflet-pan-zoom-image.html -->
<head>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css"></script>
<style>
#image-map {
width: 100%;
height: 300px;
border: 1px solid #ccc;
margin-bottom: 10px;
@0mkara
0mkara / Ethereum_private_network.md
Last active April 19, 2024 00:09
Ethereum private network configuration guide.

Create your own Ethereum private network

Introduction

Used nodes:

Linux raspberrypi 4.9.41-v7+ #1023 SMP Tue Aug 8 16:00:15 BST 2017 armv7l GNU/Linux
Linux localhost.localdomain 4.14.5-200.fc26.x86_64 #1 SMP Mon Dec 11 16:29:08 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
@hodgesmr
hodgesmr / hijacking_flask_routing_for_fun_and_profit.py
Last active June 19, 2023 19:39
Automatically register Flask routes with and without trailing slash. This way you avoid the 301 redirects and don't have to muddy up your blueprint with redundant rules.
"""Flask Blueprint sublcass that overrides `route`.
Automatically adds rules for endpoints with and without trailing slash.
"""
from flask import Blueprint, Flask
class BaseBlueprint(Blueprint):
"""The Flask Blueprint subclass."""
# This gist illustrates how to create and execute a payment with Paypal using their REST API.
# For additional informations, check the documentation: https://developer.paypal.com/docs/api/
# Note 1: I assume that you have already created a developer account for Paypal and an application.
# To test that your code is working, use the sandbox accounts.
# https://developer.paypal.com/webapps/developer/applications/accounts
# Note 2: we will not use the Paypal REST API SDK package for Node.js
# https://github.com/paypal/rest-api-sdk-nodejs
@bryanbarnard
bryanbarnard / SimpleHttpClient.cs
Created December 23, 2013 19:15
Simple C# .NET 4.5 HTTPClient Request Using Basic Auth and Proxy
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Net.Http;
using System.Net;
namespace HTTP_Test