Skip to content

Instantly share code, notes, and snippets.

@amatus
amatus / W83777.md
Last active February 3, 2022 22:18
Winbond W83777 Multi-IO Card

Winbond W83777 Multi-IO Card

JP1

COM A 1-2-3 4-5-6
COM1 (3F8) 1-2 4-5 (Default)
COM3 (3E8) 2-3 5-6
COM4 (2E8) 1-2 5-6
Disabled 2-3 4-5
@amatus
amatus / dell_idrac6_ikvm_java_setup.txt
Last active December 26, 2023 17:22
Dell iDRAC6 iKVM Java setup
apt install icedtea-netx
sed -i -e 's/JRE=.*/JRE=\/usr\/lib\/jvm\/java-8-openjdk-amd64/' /usr/share/icedtea-web/bin/javaws.sh
echo deployment.security.level=ALLOW_UNSIGNED >> ~/.config/icedtea-web/deployment.properties
comment out jdk.jar.disabledAlgorithms= and jdk.tls.disabledAlgorithms= in /etc/java-8-openjdk/security/java.security
bc 1.06.95
Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006 Free Software Foundation, Inc.
This is free software with ABSOLUTELY NO WARRANTY.
For details type `warranty'.
define f (x) {
if (x <= 1) return (1);
return (f(x-1) * x);
}
f(6)/f(4)
30
@amatus
amatus / http.sh
Last active February 24, 2018 03:33
Running SimpleHTTPServer on 80 as nobody
# You need the latest libcap2 code from git for --addamb
capsh --caps="cap_net_bind_service+eip cap_setpcap,cap_setuid,cap_setgid+ep" --keep=1 --user=nobody --addamb=cap_net_bind_service -- -c "/usr/bin/python -m SimpleHTTPServer 80"
0x606060405236156100b75763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100bc578063095ea7b31461014757806318160ddd1461017d57806323b872dd146101a2578063313ce567146101de57806342966c681461020757806370a082311461023157806379cc67901461026257806395d89b4114610298578063a9059cbb14610323578063cae9ca5114610347578063dd62ed3e146103c0575b600080fd5b34156100c757600080fd5b6100cf6103f7565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561010c5780820151818401525b6020016100f3565b50505050905090810190601f1680156101395780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561015257600080fd5b610169600160a060020a0360043516602435610495565b604051901515815260200160405180910390f35b341561018857600080fd5b6101906104c6565b60405190815260200160405180910390f35b34156101ad57600080fd5b610169600160a060020a03600435811690602435166044356104cc565b604051901515815260200160405180910390f35b34156101e957600080fd5b6101f1610544565b60405160ff9091168152602001
#include <stdio.h>
#include <math.h>
#include <glib/gtypes.h> // srsly guys?
#include <gts.h>
int main(int argc, char **argv)
{
GtsVolumeOptimizedParams params;
guint min_number = 500000;
gdouble min_angle = 3.14159 / 180 / 60;
#include <stdio.h>
#include <math.h>
#include <glib/gtypes.h> // srsly guys?
#include <gts.h>
void mandelbulb(gdouble **a, GtsCartesianGrid g, guint i, gpointer data)
{
guint j, k, n;
gdouble x, y, z = g.z;
gdouble xi, yi, zi;
#include <avr/io.h>
#include <avr/sleep.h>
void main()
{
static char state __attribute__ ((section (".noinit")));
DDRB |= (1 << PB2);
if (state)
{
16:18 <@richinseattle> amatus: run this
16:18 <@richinseattle> cd /home
16:18 <@richinseattle> sudo git clone https://github.com/caktux/slackbridge.git
16:18 <@richinseattle> cd slackbridge
16:18 <@richinseattle> sudo mv /tmp/config_from_rich docker/config.json
16:18 <@richinseattle> sudo docker build -t slackbridge docker/.
16:18 <@richinseattle> sudo docker run -d -t slackbridge
static inline void
cbi(volatile uint8_t *sfr, char bit)
{
_SFR_BYTE(*sfr) &= ~_BV(bit);
}
#define LED_POWER &PORTD,2
cbi(LED_POWER);