This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// so a cool trick with macros in C (and C++) is that since macros inside of | |
// macros are stille evaluated by the preprocessor, you can use macro names as | |
// parameters to other macros (and even construct macro names out of out of | |
// parameters!) - so using this trick if we have some macro like | |
// this: | |
#include <stddef.h> | |
#define MY_TYPES_ITER(_F, ...) \ | |
_F(FOO, foo, 0, __VA_ARGS__) \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import psutil | |
import platform | |
from datetime import datetime | |
def get_size(bytes, suffix="B"): | |
""" | |
Scale bytes to its proper format | |
e.g: | |
1253656 => '1.20MB' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /usr/share/BasiliskII/keycodes | |
# | |
# Basilisk II (C) 1997-2005 Christian Bauer | |
# | |
# This file is used to translate the (server-specific) scancodes to | |
# Mac keycodes depending on the window server being used. | |
# | |
# The format of this file is as follows: | |
# | |
# sdl <driver string> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* dwmconfig.h | |
* Hardware multimedia keys | |
*/ | |
/* Somewhere at the beginning of config.h include: */ | |
/* | |
You obviously need the X11 development packages installed, X11proto in particular, but | |
here is the location of the keysyms header upstream copy if you can't bother | |
using the contents of your own hard drive. ;-P |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* USB HID Keyboard scan codes as per USB spec 1.11 | |
* plus some additional codes | |
* | |
* Created by MightyPork, 2016 | |
* Public domain | |
* | |
* Adapted from: | |
* https://source.android.com/devices/input/keyboard-devices.html | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.Synopsis | |
Pipe binary data between processes' Standard Output and Standard Input streams. | |
Can read input stream from file and save resulting output stream to file. | |
.Description | |
Pipe binary data between processes' Standard Output and Standard Input streams. | |
Can read input stream from file/pipeline and save resulting output stream to file. | |
Requires PsAsync module: http://psasync.codeplex.com |
-
Single-line comments are started with
//
. Multi-line comments are started with/*
and ended with*/
. -
C# uses braces (
{
and}
) instead of indentation to organize code into blocks. If a block is a single line, the braces can be omitted. For example,
- DOS usb boot -> ubuntu live iso usb boot(too big), minimal_linux_live_20-Jan-2017_64-bit.iso(only 6.8MB)
- diskgenius for dos -> testdisk("No Log\Proceed\Intel\Analyse\Quick Search", better than fdisk), gnome-disks
- norton ghost for dos -> "fsarchiver savefs" "fsarchiver restfs", remastersys
- windows xp -> debian+de(lxde, xfce), kali, ubuntu
- ntldr boot.ini -> grub menu.lst, boot-repair
- RemapKey/KeyTweak -> xmodmap -pke > ~/.Xmodmap then modify it, it will be loaded automatically
- myboard.exe -> myboard.py + modified xorg-server + modified libgtk2.0-0 + fcitx-googlepinyin
- MagicMover(D:\Program Files) -> remastersys restored sda1 + UnionFS-FUSE(pivot_root) sda2
- WinHex -> wxHexEditor, bless, (sublime hexviewer only can edit one line)
- emEditor(PHP/C braces outline, csv editor) -> sublime(ctrl+r to list functions, addon packages: AlignTab,SublimeCodeIntel,Codecs,ConvertToUTF8), SciTE(to view log files)
NewerOlder