Skip to content

Instantly share code, notes, and snippets.

@3735943886
3735943886 / SetDeviceState.c
Last active January 25, 2024 08:46
Disable or Enable Device with Hardware ID
/* for Devpkey */
#define INITGUID
/* dependencies */
#pragma comment (lib, "SetupAPI")
#include <windows.h>
#include <SetupAPI.h>
#include <Devpkey.h>
VOID SetDeviceState(LPCWSTR lpszHardwareId, DWORD dwState)
@3735943886
3735943886 / SetMonitorPower.c
Last active July 17, 2025 11:30
Turn On / Off display monitor
/* dependencies */
#pragma comment(lib, "dxva2")
#pragma comment(lib, "user32")
#include <lowlevelmonitorconfigurationapi.h>
typedef struct _MONITORPOWERPARAM
{
LPCWSTR szPhysicalMonitorDescription;
BOOL bPowerOn;
} MONITOR_POWER_PARAM, *PMONITOR_POWER_PARAM;
@3735943886
3735943886 / otp.sh
Last active September 20, 2022 07:02
#!/usr/bin/env bash
LOGINUSER="$(who am i | awk '{print $1}')"
HOMEDIR="$(getent passwd $LOGINUSER | cut -d: -f6)"
OTPKEY="$HOMEDIR/.otpkeys"
RCX=0
echo
if [ -f "$OTPKEY" ]
then
while read -r services; do
using System.Windows.Automation;
// WINDOWS CREDENTIAL UI AUTOMATION by 3735943886
/*
Credential Dialog Xaml Host
- TextBlock / WindowLogo / 
- TextBlock / / Windows 보안
- Button / CloseButton / 닫기
- ScrollViewer / /
@3735943886
3735943886 / aptner.py
Last active August 28, 2024 01:08
Get Aptner Data
#!/usr/bin/python3
import requests
import json
class aptner:
urlbase = 'https://v2.aptner.com'
headers = { 'Content-Type': 'application/json' }
token = None
id = None