Skip to content

Instantly share code, notes, and snippets.

@rtuin
rtuin / gist:5028719
Last active April 11, 2024 14:57
400 Bad Request
To the tune of Lady Gaga - Bad Romance
http://www.youtube.com/watch?v=qrO4YZeyl0I
Oh, caught in a bad request
Oh, caught in a bad request
Rah, rah, oh, oh, oh
Roma, roma, ma
Gaga, ooh, la, la
Received a bad request
@castano
castano / hemicube.cpp
Created June 20, 2014 09:46
Hemicube Integrator
#include "hemicube.h"
#define PACK_HEMICUBES 1
static void get_hemicube_face_normal(int index, Vector3 *forward, Vector3 *left, Vector3 *up) {
// Unwrapped hemicube with positive-Z in the middle.
switch (index) {
case 0: *forward = Vector3(+1, 0, 0); *left = Vector3( 0, 1, 0); break;
@labe-me
labe-me / build.sbt
Created January 13, 2016 22:55
Enabling DCEVM and Hotswap Agent in SBT + sbt-revolver plugin
val hotswapAgentJarPath = Def.settingKey[Option[String]]("Path to hotswap-agent.jar, enables DCEVM in run and reStart")
// set hotswapAgentJarPath := Some("/Users/lbedubourg/local/hotswap-agent.jar")
hotswapAgentJarPath := sys.env.get("HOTSWAP_AGENT_JAR")
def hotswapJavaOptions(path: Option[String]) = path match {
case None => Seq()
case Some(p) => Seq("-XXaltjvm=dcevm", s"-javaagent:${p}=autoHotswap=true")
}
@hypest
hypest / wait-jitpack.gradle
Last active December 22, 2018 22:12
Manually wait for JitPack to make an artifact available
def waitJitpack(group, module, hash) {
preBuild.dependsOn(tasks.create(name: "waitJitpack-${module}-${hash}") { thisTask ->
def url = "https://jitpack.io/${group.replace('.', '/')}/${module}/${hash}/${module}-${hash}.pom"
def backoffLimit = 7
for (def backoffCount : (0..backoffLimit)) {
def connection = new URL(url).openConnection() as HttpURLConnection
def timeout = (2**backoffCount) * 5 * 1000; // exponential timeout
connection.setConnectTimeout(timeout)
@cornerman
cornerman / IncStore.scala
Created March 27, 2019 22:14
Incremental Store
import monix.execution.{Ack, Cancelable, Scheduler}
import monix.reactive.observers.Subscriber
import monix.reactive.{Observable, Observer}
import monix.reactive.subjects.PublishSubject
import scala.concurrent.Future
trait IncStore[State, InAction, OutAction] { self =>
def initialState: State
@jmettes
jmettes / build-closure.sh
Last active June 4, 2021 06:09
NixOS ISO
nix-build --attr system "./nixos.nix" -o result-closure
readlink -f result-closure > closure-nix-store-path.txt
rm -r system
mkdir system
nix copy ./result-closure --to file://./system
@madduci
madduci / ftth_openwrt.md
Last active November 11, 2024 13:44
Deutsche Telekom FTTH Access with OpenWRT

Configuring Deutsche Telekom FTTH Access with OpenWRT

After looking for alternatves to the suggested Router from Telekom (AVM FritzBox and HUawei Speedport), I've discovered the possibility of configuring my existing OpenWRT Router to act as gateway to the Telekom FTTH (Fiber To The Home) Magenta Zuhause package.

TL;DR

The WAN interface must be configured as follows (see your Telekom letter):

  • Protocol: PPPoE
  • PAP/CHAP username: