Skip to content

Instantly share code, notes, and snippets.

View martinellimarco's full-sized avatar

Marco Martinelli martinellimarco

View GitHub Profile

Trashing the Vodafone Station

How to replace the Vodafone Station with your very own router

Vodafone forces its customers to use their modem/router, the "Vodafone Station": using any other router is impossible because authentication is being done via a custom PPPoE setup.
In the PPPoE packet there is a field named Host-Uniq which is used to separate packets from different PPPoE sessions: Vodafone requires the Station serial number to be put in this field as authentication.

Hardware setup

A Linux router with root access is needed to replace the Station with. With an xDSL connection a modem with a custom firmware like OpenWrt has to be used, most likely one based on a Lantiq SoC.
For a FTTH internet connection then every machine with at least two gigabit ethernet interface and a decent CPU will do it.

@jonathanlurie
jonathanlurie / arrayFunction.cpp
Created March 10, 2017 20:56
Emscripten and float arrays v2
#include <math.h>
// otherwise C++ function names are mangled
extern "C" {
void float_multiply_array(float *data, int w, int h, int ncpp) {
int length = w*h;
int currentPixelIndex = 0;
@Leowbattle
Leowbattle / TransitionScreen.java
Created March 3, 2018 15:49
Simple fade-in fade-out screen transition for libGDX
package leo.sortorsplode;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Screen;
import com.badlogic.gdx.graphics.glutils.ShapeRenderer;
public class TransitionScreen implements Screen {
private Screen currentScreen;
private Screen nextScreen;
@tanaikech
tanaikech / submit.md
Last active December 12, 2023 23:41
Retrieving Access Token using Service Account for PHP without using googleapis

Retrieving Access Token using Service Account for PHP without using googleapis

This is a sample PHP script to retrieve the access token from Service Account of Google without using googleapis.

Sample script

<?php

$private_key = "-----BEGIN PRIVATE KEY-----\n###-----END PRIVATE KEY-----\n"; // private_key of JSON file retrieved by creating Service Account
@fuweichin
fuweichin / index.html
Last active January 30, 2024 15:09
Power Saving Mode detection
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Power Saving Mode detection</title>
</head>
<body>
<div>Power Saving Mode? <code id="powerSavingMode"></code></div>
<script type="module">