Skip to content

Instantly share code, notes, and snippets.

Avatar

Janne Paalijarvi usvi

View GitHub Profile
View child_window_win32_main.c
#include <windows.h>
LRESULT CALLBACK HelloWndProc (HWND, UINT, WPARAM, LPARAM);
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
PSTR szCMLine, int iCmdShow)
{
static TCHAR szAppName[] = TEXT ("HelloApplication");
HWND hwnd,hwnd2;
MSG msg;
@usvi
usvi / TemporaryResearchMib.txt
Created Dec 4, 2021
SNMP MIB definition demonstrating proper use of OBJECT-GROUP, NOTIFICATION-GROUP, MODULE-COMPLIANCE (according to smilint)
View TemporaryResearchMib.txt
TEMPORARY-RESEARCH-MIB DEFINITIONS ::= BEGIN
IMPORTS
MODULE-IDENTITY, OBJECT-TYPE, enterprises, Integer32, NOTIFICATION-TYPE FROM SNMPv2-SMI
OBJECT-GROUP, NOTIFICATION-GROUP, MODULE-COMPLIANCE FROM SNMPv2-CONF;
exampleCorp MODULE-IDENTITY
LAST-UPDATED "202111241500Z"
View RemoveOSCHeck.vbs
' name this file as RemoveOSCHeck.vbs
' This script can be used to remove operating system version checks (2000, xp, vista, 7)
' or architecture checks used for (32-bit x86 or 64-bit x64 systems)
' that are part of an MSI installer. To use drag an MSI file to RemoveOSCHeck.vbs icon.
Option Explicit
Const msiOpenDatabaseModeReadOnly = 0
Const msiOpenDatabaseModeTransact = 1
Dim argNum, argCount:argCount = Wscript.Arguments.Count
View simple-nat.service
[Unit]
# Put this file as (chmod 644) /etc/systemd/system/simple-nat.service
# Then systemctl start simple-nat
# Finally systemctl enable simple-nat
# Reboot to see it works
# Public if = enp1s0
# Private if = enp2s0
Description=Simple NAT
Before=network-pre.target
Wants=network-pre.target
@usvi
usvi / APKBUILD
Last active Oct 12, 2020
Alpine Linux APKBUILD for Samsung splix drivers
View APKBUILD
# Contributor: Aurelien Crock
# Contributor: Till Kamppeter
# Maintainer: Janne Paalijarvi <jpaalija@gmail.remove.com>
pkgname=splix
pkgver=2.0.0
pkgrel=2
pkgdesc="Samsung printers CUPS support files"
url="http://splix.ap2c.org/"
arch="all"
license="GPL"
View gist:057cb49d1d8bbb74742977b1e242bb98
[ 95.746248] usb 1-1: new high-speed USB device number 2 using ehci-pci
[ 96.745865] usb 1-1: New USB device found, idVendor=046d, idProduct=0809, bcdDevice= 0.10
[ 96.745867] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=2
[ 96.745872] usb 1-1: SerialNumber: B5908D8C
[ 96.774296] type=1400 audit(1589753654.797:484): avc: denied { write } for pid=2065 comm="Binder:2065_D" name="timerslack_ns"\
dev="proc" ino=14995 scontext=u:r:system_server:s0 tcontext=u:r:mediaprovider:s0:c512,c768 tclass=file permissive=1
[ 96.774299] type=1400 audit(1589753679.963:485): avc: denied { sys_module } for pid=1880 comm="ueventd" capability=16 scontex\
t=u:r:ueventd:s0 tcontext=u:r:ueventd:s0 tclass=capability permissive=1
[ 96.774323] type=1400 audit(1589753679.963:485): avc: denied { sys_module } for pid=1880 comm="ueventd" capability=16 scontex\
t=u:r:ueventd:s0 tcontext=u:r:ueventd:s0 tclass=capability permissive=1
View gist:0558df72546a8f1e7418671e709a64ed
test complete
test reset
test define
test add 400ms pwm2.0 monitor
test add 1s end
test commit
test run
ok
ok
ok