Skip to content

Instantly share code, notes, and snippets.

View Zensey's full-sized avatar
🎯

Anton Litvinov Zensey

🎯
View GitHub Profile
import 'package:ffi/src/utf8.dart';
import 'package:ffi/ffi.dart';
import 'package:win32/win32.dart';
import 'dart:convert';
import 'dart:ffi';
import 'dart:io';
import 'dart:isolate';
@Zensey
Zensey / .bashrc_history_menu
Last active February 23, 2022 21:23
A .bashrc addition for separation of history files
#!/bin/bash
dir=.history.d
if [ ! -d ~/$dir ]
then
mkdir -p ~/$dir
touch ~/$dir/ssh
touch ~/$dir/dev
touch ~/$dir/adm
touch ~/$dir/games

Keybase proof

I hereby claim:

  • I am zensey on github.
  • I am zensey (https://keybase.io/zensey) on keybase.
  • I have a public key ASBg75DrYpulw_FAPhLlYI1LzWbNN9dlx7CK4GpKhBJrtAo

To claim this, I am signing this object:

@Zensey
Zensey / inittab
Last active December 28, 2016 00:46
inittab fragment for socat
s1:2345:respawn:/usr/bin/socat tcp-l:12001,reuseaddr,forever /dev/ttyS2,b9600,cs8,cstopb=0,raw,unlink-close=0,echo=0
CC = cl
LIBS = kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib
M = /MACHINE:X86
#M = /MACHINE:X64
CFLAGS = /MD /GS /GL /W3 /Gy /Zc:wchar_t /I"..\sqlite-autoconf-3130000" /Gm- /O2 /sdl /fp:precise /D "_WINDLL" /D "_MBCS" /errorReport:prompt /WX- /Zc:forScope /Gd /Oi /EHsc /nologo /c
LINK = /ERRORREPORT:PROMPT /NOLOGO /NXCOMPAT /DYNAMICBASE /OPT:REF /OPT:ICF /IMPLIB:"ext.lib" /DLL /TLBID:1 /LTCG
RM = rm -f
set appdir=%~dp0
cd %appdir%
@echo off
@setlocal
nssm.exe install Syncthing syncthing.exe -no-console -no-browser -home="c:\users\litvinov.a\AppData\Local\Syncthing"
nssm set Syncthing AppDirectory %appdir%
nssm.exe edit Syncthing
net start Syncthing
Hardware IDs:
-> "USB\VID_10C4&PID_EA60&REV_0100"
-> "USB\VID_10C4&PID_EA60"
Id: USB\VID_10C4&PID_EA60\0001
Vid: 10C4
Pid: EA60
Device Description: Silicon Labs CP210x USB to UART Bridge
Manufacturer: Silicon Laboratories
PortName COM18
Hardware IDs:
#include "stdafx.h"
#include <stdio.h>
#include <string.h>
#include <windows.h>
#include <Setupapi.h>
#include <devguid.h>
#include "conio.h"
#include "tchar.h"
// Get-WMIObject Win32_pnpentity | ? Description -like "*CH*"
su - autossh -s /bin/sh -c "/usr/bin/autossh -M 0 -N -f -R 5001:localhost:22 remote@1.1.1.1"
autossh -M 0 -N -f -R 5001:localhost:22 remote@1.1.1.1