Name | |||||||
---|---|---|---|---|---|---|---|
L1 cache reference | 0.5 | ns | |||||
Branch mispredict | 5 | ns | |||||
L2 cachereference | 7 | ns | 14x L1 cache | ||||
Mutex lock/unlock | 25 | ns | |||||
Main memory reference | 100 | ns | 20x L2 cache, 200x L1 cache | ||||
Compress 1K bytes with Zippy | 3,000 | ns | 3 | us |
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
[Unit] | |
Description=Kills VLC on resume in order to fix logging spam | |
[Service] | |
Type=oneshot | |
ExecStart=-/usr/bin/killall vlc | |
TimeoutSec=0 | |
StandardOutput=syslog | |
After=suspend.target |
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
# Stick this in your home directory and point your Global Git config at it by running: | |
# | |
# $ git config --global core.attributesfile ~/.gitattributes | |
# | |
# See https://tekin.co.uk/2020/10/better-git-diff-output-for-ruby-python-elixir-and-more for more details | |
*.c diff=cpp | |
*.h diff=cpp | |
*.c++ diff=cpp | |
*.h++ diff=cpp |
This file has been truncated, but you can view the full file.
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
exec(''.join(chr(int(''.join(str(ord(i)-8203)for i in c),2))for c in ' |
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
[alias] | |
## | |
# One letter alias for our most frequent commands. | |
# | |
# Guidelines: these aliases do not use options, because we want | |
# these aliases to be easy to compose and use in many ways. | |
## | |
a = add |
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
"""An atomic, thread-safe incrementing counter.""" | |
import threading | |
class AtomicCounter: | |
"""An atomic, thread-safe incrementing counter. | |
>>> counter = AtomicCounter() | |
>>> counter.increment() |
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
@startuml | |
' uncomment the line below if you're using computer with a retina display | |
' skinparam dpi 300 | |
!define Table(name,desc) class name as "desc" << (T,#FFAAAA) >> | |
' we use bold for primary key | |
' green color for unique | |
' and underscore for not_null | |
!define primary_key(x) <b>x</b> | |
!define unique(x) <color:green>x</color> | |
!define not_null(x) <u>x</u> |
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
@echo off | |
echo Uninstalling KB3075249 (telemetry for Win7/8.1) | |
start /w wusa.exe /uninstall /kb:3075249 /quiet /norestart | |
echo Uninstalling KB3080149 (telemetry for Win7/8.1) | |
start /w wusa.exe /uninstall /kb:3080149 /quiet /norestart | |
echo Uninstalling KB3021917 (telemetry for Win7) | |
start /w wusa.exe /uninstall /kb:3021917 /quiet /norestart | |
echo Uninstalling KB3022345 (telemetry) | |
start /w wusa.exe /uninstall /kb:3022345 /quiet /norestart | |
echo Uninstalling KB3068708 (telemetry) |
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
#include <stdio.h> | |
void DumpHex(const void* data, size_t size) { | |
char ascii[17]; | |
size_t i, j; | |
ascii[16] = '\0'; | |
for (i = 0; i < size; ++i) { | |
printf("%02X ", ((unsigned char*)data)[i]); | |
if (((unsigned char*)data)[i] >= ' ' && ((unsigned char*)data)[i] <= '~') { | |
ascii[i % 16] = ((unsigned char*)data)[i]; |
NewerOlder