Skip to content

Instantly share code, notes, and snippets.

View CoolOppo's full-sized avatar
🇺🇲

Max Azoury CoolOppo

🇺🇲
View GitHub Profile

Windows system key combinations

  • ALT+F4: Quit program
  • ALT+TAB: Switch between open programs
  • CTRL+ESC: Open Start menu
  • F1: Help
  • SHIFT+DELETE: Delete item permanently
  • SHIFT+Windows Logo+M: Undo minimize all
  • Windows Logo+D: Minimizes all open windows and displays the desktop
  • Windows Logo+E: Windows Explorer
  • Windows Logo+F: Find files or folders
@CoolOppo
CoolOppo / Embedding-Executables.md
Last active February 25, 2025 09:16
How to Embed an exe Inside Another exe as a Resource and Then Launch It

Edit 11 years later: I did not write this. Not sure the original source, but thanks to the original author.

How to Embed an exe Inside Another exe as a Resource and Then Launch It

While working on a utility project today, I stumbled upon wanting to embed an executable inside another executable. Sounds fun doesn’t it? And what is even more fun is to be able to launch the embedded exe!

Basically, here’s how it works. You embed Foo.exe inside Bar.exe. And by embed I mean, add Foo.exe as a resource in Bar.exe and then, from Bar.exe’s code, you can launch Foo.exe using CreateProcess().

So before answering the "Why?" lets answer the "How?"

launch4j exec error

I was having a shit ton of problems getting launch4j to work. Simply get a recent version of MinGW's ld.exe and windres.exe files, and replace the ones in the bin folder. That seems to do the trick.

Another thing to try is using the DOS path instead of the standard Windows one when you refer to the directory containing JRE. Apparently, the tool doesn't support paths with spaces in them, although it is somewhat sporadic. I used cygpath to generate my path. The command I used is cygpath -wsa "C:\Program Files (x86)\Java\jre1.8.0_20", which resulted in C:\PROGRA~2\Java\JRE18~1.0_2 as the DOS path.

A working XML config for launch4j is below.

<?xml version="1.0" encoding="UTF-8" ?>
@CoolOppo
CoolOppo / jdk-make-portable.bat
Last active August 29, 2015 14:05
Converts an extracted JDK directory to actually make it run portably
for /r %%x in (*.pack) do bin\unpack200 "%%~x" "%%~dpnx.jar" && del /q /f "%%~x"

Neutering the “developer mode” screen on your Chromebook

I am the proud owner of two Chromebooks – one Samsung Series 3 ARM Chromebook and one Samsung 550 Chromebook. Like many serial tinkerers the frowny/sick developer “warning” screen, which you get if you want to overwrite the operating system having to enable developer mode, is more of a pain than anything, much as I recognise it is for security. Having to press CTRL + D at every boot, or wait 30 seconds and endure a loud, audible beep is not my idea of slick fun. Happily, it is possible to all but disable this screen, by rewriting the BIOS with the correct “flags”. This leaves the screen enabled, but it only displays for 2 seconds, and there is no beep. Unhappily, you have to physically open the Chromebook up and disable the inbuilt BIOS write protect to take advantage of this.

The procedure is a follows:

  • Open Chromebook and enable/disable write protect jumpe
anonymous
anonymous / gist:9a66c8199c863f226149
Created December 20, 2014 01:06
firefox zip-bomb
a first try of a zip-bomb, based on maulwuffs work
http://noxxi.de/research/content-encoding-online-scanner.html
see this discussion: https://www.reddit.com/r/netsec/comments/2ptj33/is_this_url_safe_hiding_malware_in_plain_sight/
contact: https://twitter.com/moduloo1
this 1.9k php-file below kills my firefox and renders my desktop unusable, while
@olange
olange / graphviz-build-system-for-sublime.md
Created January 4, 2015 00:21
Graphviz (DOT) Build System for Sublime Text 2 and 3

To transform the currently opened Graphviz source file (in DOT Language) into a PNG:

{
    "cmd": [ "dot", "-Tpng", "-o", "$file_base_name.png", "$file"],
    "selector": "source.dot"
}

Usage

@jorinvo
jorinvo / challenge.md
Last active November 19, 2024 02:40
This is a little challenge to find out which tools programmers use to get their everyday tasks done quickly.

You got your hands on some data that was leaked from a social network and you want to help the poor people.

Luckily you know a government service to automatically block a list of credit cards.

The service is a little old school though and you have to upload a CSV file in the exact format. The upload fails if the CSV file contains invalid data.

The CSV files should have two columns, Name and Credit Card. Also, it must be named after the following pattern:

YYYYMMDD.csv.

# Background function to run any given command in the background and
# disown it from the shell, hiding ALL output:
bkr()
{
(nohup "$@" &>/dev/null &)
}