Skip to content

Instantly share code, notes, and snippets.

@uhziel
uhziel / SetConsoleCtrlHandler.c
Created January 6, 2012 02:45
Set Console Ctrl Handler in Windows
/*
* filename: SetConsoleCtrlHandler.c
* description:
* This is a example of the SetConsoleCtrlHandler function that is used to
* install a control handler.
* via http://msdn.microsoft.com/en-us/library/ms685049(v=VS.85).aspx
* author: uhziel(uhziel@gmail.com)
* history:
* version date ps
* ------- ---------- --------------------------------
@josephj
josephj / happy-desinger-mini-1.md
Last active December 18, 2015 10:39
於 HappyDesigner Mini #1 分享會

JavaScript 品質工具:CodePaint 與 Plato

介紹協助提昇 F2E Code Style 的兩個工具。

分享者

josephj@faria

問題

#include <errno.h>
#include <fcntl.h>
#include <linux/videodev2.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <unistd.h>
#include <opencv2/core/core.hpp>
@mikesmullin
mikesmullin / x86-assembly-notes.md
Last active July 18, 2024 01:57
Notes on x86-64 Assembly and Machine Code

Mike's x86-64 Assembly (ASM) Notes

Assembling Binary Machine Code

Operating Modes:

These determine the assumed/default size of instruction operands, and restricts which opcodes are available, and how they are used.

Modern operating systems, booted inside Real mode,

@umardx
umardx / Shrink.md
Last active February 23, 2021 09:02
How to Shrink the Cloned Raspberry Pi Image (Linux-only)

How to Shrink the Cloned Raspberry Pi Image (Linux-only)

These methods create an image file that is equal to the total capacity of the SD card. For example, cloning an SD card with a capacity of 32GB will create an image file of 32 GB, even if only 5 GB is actually in use on the card. This is fine if you only have one or two such images, but any more than that (especially if you use an SSD) will cause you to run out of space. Unfortunately, this tool is only available on Linux. If you do not have Linux installed, you can install the latest version of Ubuntu or Linux Mint in a virtual machine, and run this script there:

shrink.sh

#!/bin/bash
@Jian-Min-Huang
Jian-Min-Huang / buddha.txt
Created August 18, 2021 04:55
Buddha Ascii Art
// _oo0oo_
// o8888888o
// 88" . "88
// (| -_- |)
// 0\ = /0
// ___/`---'\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- |||||- \
// | | \\\ - /// | |