Skip to content

Instantly share code, notes, and snippets.

@zhenguoli
zhenguoli / shit
Created June 19, 2017 05:26 — forked from certik/shit
#!/usr/bin/perl
no warnings 'utf8';
use strict;
use Image::Magick;
use Term::Size;
use Getopt::Long;
use Time::HiRes qw(gettimeofday tv_interval);
our ($cachehit,$cachemiss,$nocache,$filter);
@zhenguoli
zhenguoli / Visual C++.sublime-build
Last active September 27, 2017 11:24 — forked from mikhdm/Visual C++.sublime-build
Visual C++ build system for sublime text to exec and compile .c and .cpp files from Subime Text editor.
{
"cmd": ["vcvars32.bat", "&", "cl", "/EHsc", "${file}"],
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$",
"working_dir": "${file_path}",
"selector": "source.c, source.cpp, source.c++",
// By default cl is not in your PATH, so add it to your path (preferably)
// or uncomment "path" and check that it has correct value
//"path": "path:/to/folder/where/cl.exe/located",
// this also will set path for vcvars32.bat
"shell": true, // Without this sublime has hard times to parse "&" in out command line
@zhenguoli
zhenguoli / gnome-terminal-profiles.adoc
Created April 29, 2018 06:35
Export / Import Gnome Terminal Profiles

Export Gnome Terminal Profile

List profiles

dconf dump /org/gnome/terminal/legacy/profiles:/

Determine the terminal profile string for the profile you will need. This is the terminal profile that I will export:

@zhenguoli
zhenguoli / form.html
Created September 26, 2018 05:34 — forked from runspired/form.html
How to turn off password and email/username autocomplete.
<!--
<form autocomplete="off"> will turn off autocomplete for the form in most browsers
except for username/email/password fields
-->
<form autocomplete="off">
<!-- fake fields are a workaround for chrome/opera autofill getting the wrong fields -->
<input id="username" style="display:none" type="text" name="fakeusernameremembered">
<input id="password" style="display:none" type="password" name="fakepasswordremembered">
@zhenguoli
zhenguoli / LICENCE SUBLIME TEXT
Created December 1, 2018 15:58
Sublime Text 3 Serial key build is 3176
## Sublime Text 3 Serial key build is 3176
> * Added these lines into /etc/hosts
127.0.0.1 www.sublimetext.com
127.0.0.1 license.sublimehq.com
> * Used the license key
----- BEGIN LICENSE -----
@zhenguoli
zhenguoli / x86-assembly-notes.md
Created December 3, 2021 08:30 — forked from mikesmullin/x86-assembly-notes.md
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,

@zhenguoli
zhenguoli / x86-assembly-notes.md
Created December 3, 2021 08:30 — forked from mikesmullin/x86-assembly-notes.md
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,