0 - Memory Allocation
1 - Arrays
2 - Pointer Basics
2 - Same code to ASM via godbolt/GCC
3 - C-Bits Bitwise Operators and binary operations.
Learn about Bit Order | Endianess (MSB/LSB) https://github.com/Acry/Byte_Drawer
Not a script but notes, includes simple rc.d scripts which overrides check_process | |
pkg install -y ImageMagick7-nox11 ffmpeg postgresql15-server libxml2 libxslt git protobuf node16 pkgconf autoconf bison libyaml readline lzlib libffi gdbm nginx redis postgresql15-server \ | |
postgresql15-contrib py39-certbot libidn2 icu ruby30 sudo ruby30-gems rubygem-bundler gmake | |
corepack enable | |
yarn set version classic | |
pw useradd mastodon -d /usr/local/www/mastodon -m -s /nonexistent |
// This work (SDLblit.cpp, by Cory Bloyd) is free of known copyright restrictions. | |
// https://creativecommons.org/publicdomain/zero/1.0/ | |
#include <SDL.h> | |
inline uint32_t argb(uint8_t a, uint8_t r, uint8_t g, uint8_t b) { return (a<<24) | (r << 16) | (g << 8) | (b << 0); } | |
int main(int argc, char *argv[]) { | |
SDL_Init(SDL_INIT_VIDEO); | |
SDL_Rect screenRect = { 0,0,1024,1024 }; |
0 - Memory Allocation
1 - Arrays
2 - Pointer Basics
2 - Same code to ASM via godbolt/GCC
3 - C-Bits Bitwise Operators and binary operations.
Learn about Bit Order | Endianess (MSB/LSB) https://github.com/Acry/Byte_Drawer
import bpy | |
from math import pi, floor | |
rig = bpy.context.selected_objects[0] | |
def is_keyframe(ob, frame, data_path, array_index=-1): | |
if ob is not None and ob.animation_data is not None and ob.animation_data.action is not None: | |
for fcu in ob.animation_data.action.fcurves: | |
if fcu.data_path == data_path: | |
if array_index == -1 or fcu.array_index == array_index: |
#!/bin/sh | |
# Yet Another bhyve Script v0.4 | |
# Use this to try and boot 9front, the Plan9 fork. | |
# Virtio emulation works better (ported drivers) | |
# PS/2 Mouse emulation requires updated bhyve(8) | |
# If you don't have it, patch is uploaded with this Gist | |
# When partitioning, I have had more success with MBR | |
# GPT may work for some people |
# set the Windows Update service to "disabled" | |
sc.exe config wuauserv start=disabled | |
# display the status of the service | |
sc.exe query wuauserv | |
# stop the service, in case it is running | |
sc.exe stop wuauserv | |
# display the status again, because we're paranoid |
Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.
#!/bin/sh | |
DOWNLOAD_DIR=~/Downloads/weather | |
REGION=txgulf | |
# make download dir if not available | |
if [ ! -d "$DOWNLOAD_DIR" ]; then | |
mkdir -p $DOWNLOAD_DIR | |
fi |
L1 cache reference ......................... 0.5 ns
Branch mispredict ............................ 5 ns
L2 cache reference ........................... 7 ns
Mutex lock/unlock ........................... 25 ns
Main memory reference ...................... 100 ns
Compress 1K bytes with Zippy ............. 3,000 ns = 3 µs
Send 2K bytes over 1 Gbps network ....... 20,000 ns = 20 µs
SSD random read ........................ 150,000 ns = 150 µs
Read 1 MB sequentially from memory ..... 250,000 ns = 250 µs