Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

Zoom Code Review

===============

Why Code Review?

The most effective way to get bugs out of code is code review. More than running the code, more than unit tests, having someone else review an author's code is the best technique known to eliminate bugs (Fagan 1975 and Cohen 2006).

@nathangoulding
nathangoulding / delete-on-shutdown.sh
Last active January 28, 2019 20:02
delete-on-shutdown.sh
#!/bin/sh
cat <<EOF > /lib/systemd/system/delete-on-shutdown.service
[Unit]
Description=Delete this instance
Requires=network.target
DefaultDependencies=no
Before=shutdown.target
[Service]
@kay
kay / hsdis-ubuntu.sh
Last active October 21, 2019 21:16 — forked from zajacmp3/hsdis-ubuntu.sh
Build hsdis for JDK 1.8 on Debian/Ubuntu
sudo apt-get install libgmp-dev libmpfr-dev libmpc-dev g++-multilib mercurial texinfo
hg clone http://hg.openjdk.java.net/jdk8u/jdk8u
cd jdk8u
hg update jdk8u92-b14
sed -ri 's/subrepos="[^"]+"/subrepos="hotspot"/' ./make/scripts/hgforest.sh # only get hotspot
sed -ri 's/subrepos="[^"]+"/subrepos="hotspot"/' ./common/bin/hgforest.sh # only get hotspot
chmod +x ./get_source.sh; ./get_source.sh
cd hotspot/src/share/tools/hsdis
wget http://ftp.heanet.ie/mirrors/ftp.gnu.org/gnu/binutils/binutils-2.29.tar.gz
tar -xzf binutils-2.29.tar.gz
@DaveCTurner
DaveCTurner / EWD840.thy
Last active March 10, 2021 04:37
Safety and liveness proof of Dijkstra's distributed termination detection algorithm
theory EWD840
imports "HOL-TLA.TLA"
begin
section Utilities
text ‹A handful of general lemmas that were useful along the way.›
lemma temp_impI:
assumes "sigma ⊨ P ⟹ sigma ⊨ Q"
@crittermike
crittermike / wget.sh
Last active March 26, 2024 22:49
Download an entire website with wget, along with assets.
# One liner
wget --recursive --page-requisites --adjust-extension --span-hosts --convert-links --restrict-file-names=windows --domains yoursite.com --no-parent yoursite.com
# Explained
wget \
--recursive \ # Download the whole site.
--page-requisites \ # Get all assets/elements (CSS/JS/images).
--adjust-extension \ # Save files with .html on the end.
--span-hosts \ # Include necessary assets from offsite as well.
--convert-links \ # Update links to still work in the static version.

NEXUS 5X: Fix lineage 14.1 OS vendor mismatch error (N2G47F)

Issue is due to the fact that lineage 14.1 bullhead nightlies are based on the 7.1.2 N2G47F (Apr 2017) monthly update from google.

More explanations in xda-developers.

PREREQUISITE

This assumes:

  • you already know a bit about flashing you android device and you already installed TWRP.
@alexellis
alexellis / timelapse.md
Created March 9, 2017 08:48 — forked from porjo/timelapse.md
ffmpeg time-lapse

Convert sequence of JPEG images to MP4 video

ffmpeg -r 24 -pattern_type glob -i '*.JPG' -i DSC_%04d.JPG -s hd1080 -vcodec libx264 timelapse.mp4

  • -r 24 - output frame rate
  • -pattern_type glob -i '*.JPG' - all JPG files in the current directory
  • -i DSC_%04d.JPG - e.g. DSC_0397.JPG
  • -s hd1080 - 1920x1080 resolution

Slower, better quality

@joergschiller
joergschiller / a2dp_sink_ubuntu_linux.md
Created January 24, 2012 23:05
A2DP Sink on Ubuntu Linux with bluez (streaming bluetooth stereo audio from smartphone to pc)

Howto Enable and Use A2DP Sink on Ubuntu Linux with Bluez

  1. Add Enable=Source to /etc/bluetooth/audio.conf right after [General].

  2. Find address in form XX:XX:XX:XX:XX:XX of phone with hcitool scan.

  3. Pair and trust smartphone with sudo bluez-simple-agent hci0 XX:XX:XX:XX:XX:XX and sudo bluez-test-device trusted XX:XX:XX:XX:XX:XX yes.

  4. Create loopback in pulseaudio connection bluetooth a2dp source with alsa sink: