- L1 cache reference
0.5 ns - Branch mispredict
5 ns(on a bad CPU architecture you're pretty much screwed) - L2 cache reference
7 ns - Mutex lock/unlock
25 ns - Main memory reference
100 ns - Compress 1K bytes with Zippy
3,000 ns - Send 2K bytes over 1 Gbps network
20,000 ns - Read 1 MB sequentially from memory
250,000 ns
This file contains hidden or 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
| #!/bin/bash | |
| # Set defaults if not provided by environment | |
| CHECK_DELAY=${CHECK_DELAY:-5} | |
| CHECK_IP=${CHECK_IP:-8.8.8.8} | |
| PRIMARY_IF=${PRIMARY_IF:-eth0} | |
| PRIMARY_GW=${PRIMARY_GW:-1.2.3.4} | |
| BACKUP_IF=${BACKUP_IF:-eth1} | |
| BACKUP_GW=${BACKUP_GW:-2.3.4.5} |
This file contains hidden or 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/bin/env python | |
| # -*- coding: utf-8 -*- | |
| # Copyright (c) 2014 Alexey Kutepov a.k.a. rexim | |
| # Permission is hereby granted, free of charge, to any person | |
| # obtaining a copy of this software and associated documentation files | |
| # (the "Software"), to deal in the Software without restriction, | |
| # including without limitation the rights to use, copy, modify, merge, | |
| # publish, distribute, sublicense, and/or sell copies of the Software, |
This file contains hidden or 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
| sudo mkdir -m 0700 /var/www/.ssh | |
| sudo chown -R www-data:www-data /var/www/.ssh | |
| sudo -u www-data ssh-keygen (empty passphrase) | |
| # On Github, paste public key into "Deploy keys" | |
| sudo -u www-data bash | |
| cd /path/to/repo | |
| git clone ... |
iBooks EPUBs actually show up on macOS as folders. If you need the actual file you can use the above script to convert your iBook directory of files to a destination directory.
The path of iBook files as of macOS 10.15.7 is:
/Users/${USER}/Library/Mobile Documents/iCloud~com~apple~iBooks/Documents
This file contains hidden or 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
| (defun my/org-link-heading-here (cand) | |
| (when-let ((marker (get-text-property 0 'consult--candidate cand))) | |
| (save-excursion | |
| (with-current-buffer (marker-buffer marker) | |
| (goto-char marker) | |
| (org-store-link nil t))) | |
| (org-insert-all-links 1 "" " "))) | |
| (defvar-keymap embark-consult-org-heading-map | |
| :doc "Keymap for operating on org headings" | |
| :parent embark-general-map |
This file contains hidden or 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
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>My Angular from Scratch</title> | |
| <style> | |
| .my-component { | |
| font-family: Arial, sans-serif; |
This document is an up-to-date guide on compile Emacs 31 on windows with MSYS2, and make a installation with native compile that can work without MSYS2.
The idea is after get a working Emacs, you may delete MSYS2 environment to free some disk space, and forget about rebuilding Emacs