This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdio> | |
#include <mysql.h> | |
void retrieve_session_track_data(MYSQL *m) { | |
const char *data; | |
size_t length; | |
for(int type=0; type <= 255; type++) { | |
if (mysql_session_track_get_first(m, (enum enum_session_state_type) type, &data, &length) == 0) { | |
do { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "nyquist.h" | |
#include "action_layer.h" | |
#include "eeconfig.h" | |
extern keymap_config_t keymap_config; | |
// Each layer gets a name for readability, which is then used in the keymap matrix below. | |
// The underscores don't mean anything - you can have a layer called STUFF or any other name. | |
// Layer names don't all need to be of the same length, obviously, and you can also skip them | |
// entirely and just use numbers. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// gcc -D_GNU_SOURCE=1 -std=c99 a.c | |
#include <sched.h> | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <stdlib.h> | |
int f(void *p) { | |
sleep(2); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import json | |
from flask import Flask | |
app = Flask(__name__) | |
@app.route("/") | |
def hello(): | |
return "Hello World!" | |
@app.route("/.well-known/host-meta") | |
def hostmeta(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
modprobe ipv6 | |
modprobe udp_tunnel | |
modprobe ip6_udp_tunnel | |
ip link add dev wg0 type wireguard | |
wg setconf wg0 /etc/wireguard/config | |
wg showconf wg0 | |
brctl addbr internet | |
brctl stp internet on | |
ip link set up dev wg0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% | |
G90 | |
G80 | |
G28 | |
G17 | |
G21 | |
G0 X0 Y0 Z0 | |
G0 Y11 X10 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
import matplotlib.pyplot as plt | |
x = ((10,1.03),(50,1.03),(100,1.01),(500,1.005),(1000,1.015),(2500,1.00),(5000,0.98),(10000,0.92),(15000,0.84),(20000,0.75),) | |
hzz=[] | |
dbs=[] | |
for hz, v in x: | |
hzz.append(hz) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gc | |
import webrepl | |
from machine import Pin, I2C | |
from bme280 import BME280 | |
from socket import socket, AF_INET, SOCK_DGRAM | |
from time import sleep | |
webrepl.start() | |
gc.collect() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
library ieee; | |
use ieee.std_logic_1164.all; | |
use IEEE.STD_LOGIC_ARITH.all; | |
use IEEE.STD_LOGIC_UNSIGNED.all; | |
-- | |
-- This defines the actual physical inputs and outputs I'm going to use. | |
-- | |
entity Microcomputer is |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat > pugbomb.txt << EOF | |
HTTP/1.0 302 Redirect | |
Location: http://www.pugbomb.me/ | |
EOF | |
while true; do sudo nc -l -p 80 -c 'cat pugbomb.txt'; done |