Skip to content

Instantly share code, notes, and snippets.

View nocnokneo's full-sized avatar

Taylor Braun-Jones nocnokneo

  • CytoTronics
  • Boston, MA
View GitHub Profile
@ioggstream
ioggstream / system-sleep-xhci.sh
Created November 7, 2017 13:08
Disable broken xhci device before suspend and avoid freeze.
#!/bin/sh
#
# This script should prevent the following suspend errors
# which freezes the Dell Inspiron laptop.
#
# Put it in /usr/lib/systemd/system-sleep/xhci.sh
#
# The PCI 00:14.0 device is the usb xhci controller.
#
# kernel: [67445.560610] pci_pm_suspend(): hcd_pci_suspend+0x0/0x30 returns -16
# Add to ~/.bashrc
# call load_msenv from a shell to load the enviroment
function load_msenv() {
local msenv="$HOME/.msenv_bash"
if [ ! -f "$msenv" ]; then
local msenvbatch="__print_ms_env.bat"
echo "@echo off" > "$msenvbatch"
echo "call ${VS140COMNTOOLS}..\..\VC\vcvarsall.bat x64" >> "$msenvbatch"
echo "set" >> "$msenvbatch"
cmd "/C $msenvbatch" > "$msenv.tmp"
@mottosso
mottosso / README.md
Last active August 11, 2022 14:24
Filtering in QML ListView
@nocnokneo
nocnokneo / CMakeLists.txt
Last active January 4, 2024 03:34
VTK Rendered to an FBO in a Qt Quick 2 Scene Graph
cmake_minimum_required(VERSION 2.8.11)
project(VtkFboInQtQuick)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
find_package(VTK REQUIRED)
include(${VTK_USE_FILE})
@jboner
jboner / latency.txt
Last active May 27, 2024 13:42
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 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
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@chrisjacob
chrisjacob / README.md
Created February 14, 2011 14:31
Setup GitHub Pages "gh-pages" branch as a subfolder within the "master" project on your local checkout - a step-by-step guide.

Intro

Setup GitHub Pages "gh-pages" branch as a subfolder within the "master" project on your local checkout.

IMPORTANT

If you plan on switching between different branches (e.g. git checkout master-experiment then revert back with git checkout master) you will loose your child folder from this tutorial (because it's in your .gitignore and is not part of your master branch).