Skip to content

Instantly share code, notes, and snippets.

Avatar

Nils Cyclenerd

View GitHub Profile
@Cyclenerd
Cyclenerd / index.html
Created Aug 22, 2019
Static (with no PHP or other server-side scripting) Speedtest
View index.html
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="utf-8">
<title>HTML5 Speedtest</title>
<meta name="viewport" content="width=device-width">
<link rel="shortcut icon" href="favicon.ico">
<script src="speedtest.js"></script>
<script>
function I(i){return document.getElementById(i);}
@Cyclenerd
Cyclenerd / AccessPoint.ino
Created Jul 26, 2017
ESP8266 : Create a WiFi access point and provide a DNS and web server on it, catch all traffic
View AccessPoint.ino
/* Create a WiFi access point and provide a web server on it. */
#include <ESP8266WiFi.h>
#include "./DNSServer.h" // Patched lib
#include <ESP8266WebServer.h>
const byte DNS_PORT = 53; // Capture DNS requests on port 53
IPAddress apIP(10, 10, 10, 1); // Private network for server
DNSServer dnsServer; // Create the DNS object
ESP8266WebServer webServer(80); // HTTP server
View fibonacci.sh
#!/usr/bin/env bash
a="0"
b="1"
c=""
while [[ $b -lt 3000 ]]; do
c=$((a+b))
echo "$a + $b = $c"
a="$b"
@Cyclenerd
Cyclenerd / veloheroexport.py
Created Apr 22, 2017
Velo Hero Export Script
View veloheroexport.py
#!/usr/bin/env python
# This script downloads training data from Velo Hero
import sys, urllib2, urllib, json, logging, time
"""
Get Single Sign-on ID
https://app.velohero.com/sso
"""
@Cyclenerd
Cyclenerd / 00 slow sudo.md
Last active Jan 15, 2020
Slow sudo on macOS 10.12.4
View 00 slow sudo.md

Slow sudo on macOS 10.12.4

On my iMac 5k (iMac15,1) since the update on macOS 10.12.4 sudo is very slow. It takes about 5 minutes to the password prompt.

The problem is not on my MacBook Pro (MacBookPro13,1) with the same operating system 10.12.4.

With 10.12.3. I had no problems on the iMac.

Steps to Reproduce

@Cyclenerd
Cyclenerd / MyHttpClient.java
Last active Mar 1, 2017
Java & Apache HttpClient 4.5: Insecure HTTP(S) Client
View MyHttpClient.java
import javax.net.ssl.SSLContext;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
// https://hc.apache.org/httpcomponents-client-4.5.x/index.html
import org.apache.http.HttpEntity;
import org.apache.http.client.methods.CloseableHttpResponse;
import org.apache.http.client.methods.HttpGet;
import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
import org.apache.http.conn.ssl.TrustStrategy;
You can’t perform that action at this time.