Skip to content

Instantly share code, notes, and snippets.

View synology current recovery telnet password generator
#include <stdlib.h>
#include <time.h>
#include <stdio.h>
#include <sys/time.h>
int gcd(int a, int b);
void main()
struct timeval tvTime;
charlie-x / gist:8b2a9e2d1ebaa11554be0ffc6871a0bb
Created Aug 11, 2021
windows 10 install.wim extraction and using it for MSU
View gist:8b2a9e2d1ebaa11554be0ffc6871a0bb
notes on dism etc
download matching windows 10 ISO matching winver.exe, mount the iso or extract it
Mount-DiskImage -ImagePath "c:\temp\Windows-10x64.iso"
(Get-DiskImage "c:\temp\Windows-10x64.iso" | Get-Volume).DriveLetter
if htere is no install.wim and its an install.esd instead
and change to the directory where it is, show the types of windows that are available
charlie-x / gist:96a92aaaa04346bdf1fb4c3621f3e392
Created Jul 28, 2021
recompile wsl2 kernel, add modules and CAN modules + can utils.
View gist:96a92aaaa04346bdf1fb4c3621f3e392
mines ubuntu 20.04 based, WSL2
in windows
wsl --list -v
* Ubuntu-20.04 Stopped 2
in wsl
# the old update routine
sudo apt-get update -y
# add tools to build kernel, apologies if i missed anything as i already have a bunch of dev stuff setup
sudo apt-get install -y autoconf bison build-essential flex libelf-dev libncurses-dev libssl-dev libtool libudev-dev
charlie-x / gist:b61719cf09bc07e3c83aae28fe781933
Created Jan 7, 2021
build hackrf/windows msvc 2019 static
View gist:b61719cf09bc07e3c83aae28fe781933
git clone
vcpkg install libusb:x64-windows-static
vcpkg install pthreads:x64-windows-static
select hackrf/host/libhackrf/
select build folder
if cmake isn't integrated
View gist:ad4b891092d872e71163b7142364a0bb
#windows10 admin powershell
netsh interface portproxy add v4tov4 listenaddress= listenport=22 connectaddress=YOUR_WSL2IP connectport=22
netsh advfirewall firewall add rule name="Open Port 22 for WSL2" dir=in action=allow protocol=TCP localport=22
netsh interface portproxy show v4tov4
#first time
sudo apt-get install -y openssh-server
sudo ssh-keygen -A
charlie-x /
Last active Jan 2, 2021
gnuradio + ais sim for WSL2 ubuntu 20.xx
# ubuntu 20+
sudo apt-get install -y gnuradio
sudo apt-get install -y git
sudo apt-get install -y doxygen
sudo apt-get install -y swig-dev
sudo apt-get install -y swig
sudo apt-get install -y libswig-dev
sudo apt-get install -y liborc-dev
sudo apt-get install -y libhackrf-dev
sudo apt-get install -y libbladerf-dev
View ais-simulator-file2.grc
author: Mictronics
category: Custom
cmake_opt: ''
comment: ''
copyright: ''
description: ''
gen_cmake: 'On'
gen_linking: dynamic
View ais-simulator-file.grc
author: Mictronics
category: Custom
cmake_opt: ''
comment: ''
copyright: ''
description: ''
gen_cmake: 'On'
gen_linking: dynamic
View gist:c42655120e81716e4ff580bec0b3d205
#include "stdafx.h"
#include <wbemidl.h>
#include <dinput.h>
#include <xinput.h>
#pragma comment(lib,"xinput.lib")
#define SAFE_RELEASE(x) if(x) { x->Release(); x = NULL; }
View gist:36fc55d80ad1f00c06cfb7e068a83aff
#include <iostream>
using std::cout, std::endl;
#include <string>
using std::string, std::to_string;
struct eat { constexpr eat(auto...){} };
constexpr auto Tree(auto left, long val, auto right) {
return [=](auto f) { return f(left, val, right); };