Skip to content

Instantly share code, notes, and snippets.

View silverkorn's full-sized avatar

Danny Boisvert silverkorn

View GitHub Profile
@Bigpet
Bigpet / DDR_Fix_reverse_engineer.cpp
Last active April 30, 2024 18:52
Reverse engineered sources to this weird Konami PS3 Dance-Mat Input converter
// DDR_Fix_reverse_engineer.cpp
// Reverse engineered code from the rawinput_ps3_ddr.exe floating around on the net
//
#include <iostream>
#include "Windows.h"
const int ARR_SZ = 16;
DWORD g_PreviousPadState[ARR_SZ];
@passivestar
passivestar / Editor.tres
Last active April 10, 2024 20:07
Godot editor theme
[gd_resource type="Theme" load_steps=12 format=3 uid="uid://7bvxnk5n5imx"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_6h42l"]
content_margin_left = 10.5
content_margin_top = 8.75
content_margin_right = 10.5
content_margin_bottom = 8.75
bg_color = Color(0.117647, 0.117647, 0.117647, 1)
draw_center = false
border_color = Color(1, 1, 1, 0.137255)
@yamaya
yamaya / xcode-clang-vers
Last active April 3, 2024 02:28
Xcode clang version record
# Xcode 4.3.3
Apple clang version 3.1 (tags/Apple/clang-318.0.61) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin11.4.0
Thread model: posix
# Xcode 4.3.2
Apple clang version 3.1 (tags/Apple/clang-318.0.58) (based on LLVM 3.1svn)
Target: x86_64-apple-darwin11.4.0
Thread model: posix
@cupracer
cupracer / varnishlog-examples.sh
Last active February 27, 2024 11:11
varnishlog examples (version 4.x)
# filter by request host header
varnishlog -q 'ReqHeader ~ "Host: example.com"'
# filter by request url
varnishlog -q 'ReqURL ~ "^/some/path/"'
# filter by client ip (behind reverse proxy)
varnishlog -q 'ReqHeader ~ "X-Real-IP: .*123.123.123.123"'
# filter by request host header and show request url and referrer header
@artyom
artyom / rpc-tls-client.go
Last active October 9, 2023 15:44
Go RPC over TLS.You have to create the following keys: certs/client.crt, certs/client.key, certs/server.crt, certs/server.key. client.crt and server.crt should be signed with ca.crt, which should be concatenated to both client.crt and server.crt. It's easier to do with easy-rsa: http://openvpn.net/index.php/open-source/documentation/howto.html#pki
package main
import (
"crypto/tls"
"crypto/x509"
"log"
"net/rpc"
)
func main() {
@MIvanchev
MIvanchev / article.md
Last active April 4, 2023 13:39
Ever wondered what it takes to run Windows software on ARM? Then this article might be for you!
@huxuan
huxuan / Makefile
Last active February 26, 2023 17:33
Hello World for LuaJIT FFI/C++ binding.
all: lib run
lib:
g++ -shared -fPIC -o libhello.so libhello.cpp hello.cpp
run:
luajit main.lua
clean:
rm *.so
@roxlu
roxlu / list.txt
Created January 25, 2013 19:22
List of compiler targets. Use for example: ./configure --target=x86-darwin11-gcc
armv5te-android-gcc armv5te-linux-rvct armv5te-linux-gcc
armv5te-none-rvct
armv6-darwin-gcc armv6-linux-rvct armv6-linux-gcc
armv6-none-rvct
armv7-android-gcc armv7-darwin-gcc armv7-linux-rvct
armv7-linux-gcc armv7-none-rvct
mips32-linux-gcc
ppc32-darwin8-gcc ppc32-darwin9-gcc ppc32-linux-gcc
ppc64-darwin8-gcc ppc64-darwin9-gcc ppc64-linux-gcc
sparc-solaris-gcc
@philipz
philipz / gist:fadd2ddb92c4cf07fb10
Created July 3, 2015 07:41
Nginx TCP Load balancing for Mysql(3306)

TCP LOAD BALANCING

user  nginx;
worker_processes  1;

error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;


events {
@jadell
jadell / socket_file.sh
Created March 15, 2011 21:22
Read and write to a socket using only Bash
#!/bin/bash
#
# Bash must have been compiled with this ability: --enable-net-redirections
# The device files below do not actually exist.
# Use /dev/udp for UDP sockets
exec 3<>/dev/tcp/host/port
# Write to the socket as with any file descriptor
echo "Write this to the socket" >&3