Skip to content

Instantly share code, notes, and snippets.

@Rocketeer007
Rocketeer007 / fix_date.py
Last active March 16, 2025 21:32 — forked from daverigby/fix_date.py
fix_date.py - corrects the received date in IMAP folders
#!/usr/bin/python
# fix_date.py - corrects the received date in IMAP folders.
# Description:
# When moving mail between IMAP servers, the received date can become
# reset to the date when the message was added to the new server. This
# script attempts to fix this by setting the received date to the date the
# message was sent.
# Usage:
@seanjensengrey
seanjensengrey / octal_x86.txt
Last active January 13, 2025 22:43
x86 is an octal machine
# source:http://geocities.com/SiliconValley/heights/7052/opcode.txt
From: [email protected] (Mark Hopkins)
Newsgroups: alt.lang.asm
Subject: A Summary of the 80486 Opcodes and Instructions
(1) The 80x86 is an Octal Machine
This is a follow-up and revision of an article posted in alt.lang.asm on
7-5-92 concerning the 80x86 instruction encoding.
The only proper way to understand 80x86 coding is to realize that ALL 80x86
@ryo
ryo / aarch64-cond.txt
Created February 15, 2018 05:16
aarch64 condition code cheat sheet
meaning cmp A, B sign flags
------------------------------- ------- --------------- --------------- -------------------
equal eq A == B - Z == 1
not equal ne A != B - Z == 0
carry set cs,hs A >= B unsigned C == 1
carry clear cc,lo A < B unsigned C == 0
higher hi A > B unsigned C == 1 && Z == 0
lower or same ls A <= B unsigned !(C == 1 && Z == 0)
@fm4dd
fm4dd / gcc compiler optimization for arm systems.md
Last active March 21, 2025 07:04
GCC compiler optimization for ARM-based systems

GCC compiler optimization for ARM-based systems

2017-03-03 fm4dd

The gcc compiler can optimize code by taking advantage of CPU specific features. Especially for ARM CPU's, this can have impact on application performance. ARM CPU's, even under the same architecture, could be implemented with different versions of floating point units (FPU). Utilizing full FPU potential improves performance of heavier operating systems such as full Linux distributions.

-mcpu, -march: Defining the CPU type and architecture

These flags can both be used to set the CPU type. Setting one or the other is sufficient.

@greg-kennedy
greg-kennedy / FullScreenCanvas.html
Last active April 9, 2024 02:27
Full-window, proper aspect HTML5 canvas example
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Full-screen Canvas</title>
</head>
<body style="background:black">
<canvas id="canvas" style="position:fixed;background:green;">
Sorry, your browser does not appear to support HTML5 Canvas element.
</canvas>
@nicktoumpelis
nicktoumpelis / repo-rinse.sh
Created April 23, 2014 13:00
Cleans and resets a git repo and its submodules
git clean -xfd
git submodule foreach --recursive git clean -xfd
git reset --hard
git submodule foreach --recursive git reset --hard
git submodule update --init --recursive
@rofl0r
rofl0r / init.c
Created August 6, 2013 21:15
minimal init daemon by rich felker, author of musl libc
#define _XOPEN_SOURCE 700
#include <signal.h>
#include <unistd.h>
int main()
{
sigset_t set;
int status;
if (getpid() != 1) return 1;
@liangzan
liangzan / .Xresources
Created January 19, 2012 23:26
Xresources for configuring urxvt
! urxvt
URxvt*buffered: true
URxvt*cursorBlink: true
URxvt*underlineColor: yellow
URxvt*font: xft:inconsolata:size=10:antialias=true
URxvt*depth: 32
URxvt*borderless: 1
URxvt*scrollBar: false
URxvt*loginShell: true
Urxvt*secondaryScroll: true # Enable Shift-PageUp/Down in screen