Skip to content

Instantly share code, notes, and snippets.

@FrankSpierings
FrankSpierings / qemu-system-raspberry.sh
Last active October 15, 2022 12:32
Run Raspberry Pi in qemu-system-arm using versatilepb 'hardware'
#!/bin/sh
#https://github.com/dhruvvyas90/qemu-rpi-kernel/raw/master/kernel-qemu-4.4.13-jessie
KERNEL=kernel-qemu-4.4.13-jessie
#https://downloads.raspberrypi.org/raspbian_lite_latest + https://github.com/dhruvvyas90/qemu-rpi-kernel/wiki/Emulating-Jessie-image-with-4.x.xx-kernel
IMAGE=2016-05-27-raspbian-jessie-lite.img
export QEMU_AUDIO_DRV="none"
qemu-system-arm -kernel ${KERNEL} \
-cpu arm1176 \
-m 256 \
-M versatilepb \
@ssokolow
ssokolow / pagination_example.sql
Created December 23, 2009 13:02
Reasonably efficient pagination without OFFSET (SQLite version)
-- Reasonably efficient pagination without OFFSET
-- SQLite version (Adapted from MS SQL syntax)
-- Source: http://www.phpbuilder.com/board/showpost.php?p=10376515&postcount=6
SELECT foo, bar, baz, quux FROM table
WHERE oid NOT IN ( SELECT oid FROM table
ORDER BY title ASC LIMIT 50 )
ORDER BY title ASC LIMIT 10