Skip to content

Instantly share code, notes, and snippets.

@Tocchann
Tocchann / RunMessageLoop_MsgWaitForMultipleObjects.cpp
Last active August 3, 2022 13:21
MsgWaitForMultipleObjects の例
#include <map>
#include <functional>
// waitActions に登録する例は載せていない(通常は、排他制御して追加処理するのが良い)
std::map<HANDLE, std::function<bool(bool,bool&)>> waitActions;
DWORD APIENTRY SetupWaitHandles( HANDLE* waitHandles, DWORD capacityCount )
{
DWORD waitCount = 0;
if( capacityCount > 0 )
{
@dreamcat4
dreamcat4 / ikev2.xml
Created June 11, 2021 18:15 — forked from dapao9999/ikev2.xml
IKEv2 VPN profile for Apple devices, Pre-Shared Key(PSK)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<!-- IKEv2 IPSec VPN profile for Apple devices, Pre-Shared Key(PSK), no username password.
References:
https://wiki.strongswan.org/projects/strongswan/wiki/AppleIKEv2Profile
https://developer.apple.com/library/mac/featuredarticles/iPhoneConfigurationProfileRef/Introduction/Introduction.html
https://help.apple.com/configurator
The extension of this file should be .mobileconfig -->
@fi01
fi01 / SO-02J_BLU_Root_Docomo.txt
Created October 24, 2020 08:13
SO-02JのBLUとRoot化メモ(Docomoファーム)
アンロック前のバックアップ
Flashtool 0.9.25.0で34.1.B.0.336を焼く
TA領域をBackupTA_v2で取得
BLU準備
qUnlock Toolsでアンロック
サービスメニューのConfigurationで値の確認
「Bootloader unlock allowed: Yes」
この状態のTA領域をBackupTA_v2で取得
@jangxx
jangxx / extract_pdf_layers.py
Created October 7, 2020 16:32
Extract all the layers of a PDF file into their own files
#!/usr/bin/env python3
import sys
import pikepdf
if len(sys.argv) < 3:
print("Usage: extract_layers.py <input.pdf> <output_template>")
print()
print("Output template has to contain {num} somewhere, which will be replaced by the layer number.")
sys.exit(0)
@nojaja
nojaja / ScriptAutoRunner.png
Last active December 13, 2024 17:25
youtube広告削除ツール
ScriptAutoRunner.png
@rguliev
rguliev / convert_pdf.py
Last active March 25, 2024 21:12 — forked from terencezl/convert_pdf.py
Python 3: pdfminer code to convert pdf to text, html or xml
# Use `pip3 install pdfminer.six` for python3
from typing import Container
from io import BytesIO
from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter
from pdfminer.converter import TextConverter, XMLConverter, HTMLConverter
from pdfminer.layout import LAParams
from pdfminer.pdfpage import PDFPage
@pmarquees
pmarquees / readme.md
Last active April 29, 2022 08:22
Youtube Picture in picture

Youtube Picture-in-pitcure

Picture-in-Picture (PiP) allows users to watch videos in a floating window (always on top of other windows) so they can keep an eye on what they’re watching while interacting with other sites, or applications. Watch YouTube videos in Picture in Picure without installing any extensions by using the "new" requestPictureInPicture

How to use

  1. Add a new bookmark.
  2. Copy youtubePip.js and paste it into the URL field of the bookmark.
  3. Save.
  4. Click the bookmarklet in a YouTube tab and voilá!
@DerEros
DerEros / office_365_on_wine.md
Last active June 14, 2026 16:43
Installing and Running Office 365 on Wine

NOTE: THIS IS NOT A WORKING TUTORIAL I never got this to work and gave up. If you find any useful bit, go ahead an use them though.

Installing and Running Office 365 on Wine

My personal notes while trying to get Office 365 to install and run on my workstation.

Feel free to extract any useful information. Keep in mind that this is information is provided without any guarantees ... blah blah ... might kill

@imaman
imaman / cdp.js
Last active June 24, 2024 05:41
iframe inspection w/o getFlattenedDocument()
const CDP = require('chrome-remote-interface');
const chromeLauncher = require('chrome-launcher');
const util = require('util');
// cdp.js: a playground for using chrome-devtools-protocol.
// Plug-in your own code at the run() function, below.
//
// Usage:
// $ node scripts/cdp.js
//
@superboum
superboum / LICENCE.txt
Last active March 3, 2026 17:07
Install Debian with Debootstrap + Grub EFI
MIT LICENSE
Copyright 2018 Quentin Dufour
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR TH