Skip to content

Instantly share code, notes, and snippets.

View afternoon's full-sized avatar

Ben Godfrey afternoon

View GitHub Profile
@Konamiman
Konamiman / 0. WiFi for Ethernet-only devices via Raspberry Pi.md
Last active December 10, 2023 13:27
How to use a Raspberry Pi to provide WiFi for Ethernet-only devices, and how to use stunnel as a SOCKS server ro provide indirect TLS support

What's this?

I love MSX computers. I have developed quite a few things for them, including a TCP/IP stack and some networking applications. Some other MSX nerds have developed networking hardware, so boom! Here it is, Internet access from MSX, a 1980s 8 bit machine. How cool is that?

However there are a few issues that prevent us the MSX users to reach the absolute networking happiness:

  1. At the time of this writing, there isn't any solution for wireless Internet for MSX, only Ethernet hardware.
  2. InterNestor Lite, the TCP/IP stack for MSX, doesn't support TLS. It's not that the developer (me!) is too lazy to implement it, it's just that a Z80 can't handle the required encryption algorythms. Trust me, I tried.

So

@nicklasb
nicklasb / test_exchange_message.py
Created March 31, 2015 13:09
Ultra-ugly test of message
__author__ = 'Nicklas Börjesson'
from lxml.builder import ElementMaker
import lxml.etree
from pyexchange import Exchange2010Service, ExchangeNTLMAuthConnection
URL = u'https://your_server/EWS/Exchange.asmx'
USERNAME = u'your_domain\\your_account'
@baldowl
baldowl / octokit-basic-auth-with-otp.rb
Last active March 6, 2017 15:54
Adjusting To GitHub's 2FA
security add-generic-password \
-a my-github-login \
-s github \
-D "GitHub's OAuth2 Token" \
-T "" \
-w the-long-oauth-token
@Mithrandir0x
Mithrandir0x / gist:3639232
Created September 5, 2012 16:15
Difference between Service, Factory and Provider in AngularJS
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/
// author: Pawel Kozlowski
var myApp = angular.module('myApp', []);
//service style, probably the simplest one
myApp.service('helloWorldFromService', function() {
this.sayHello = function() {
return "Hello, World!"
@jboner
jboner / latency.txt
Last active May 7, 2024 19:39
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD