# raspbian stretch lite on ubuntu
### You can write the raspbian image onto the sd card,
# boot the pi so it expands the fs, then plug back to your laptop/desktop
# and chroot to it with my script
# https://gist.github.com/htruong/7df502fb60268eeee5bca21ef3e436eb
# sudo ./chroot-to-pi.sh /dev/sdb
# I found it to be much less of a pain in the ass and more reliable
# than doing the kpartx thing
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
export default (title, content) => ` | |
<html> | |
<head> | |
<title>${title}</title> | |
<link | |
rel="stylesheet" | |
href="//cdn.jsdelivr.net/combine/npm/[email protected]/build/base-min.css,npm/[email protected]/build/grids-min.css,npm/[email protected]/build/forms-min.css" | |
/> | |
<style> | |
img { |
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> | |
#include <stdlib.h> | |
#include <string.h> | |
void printArr(int arr_len, int * arr) { | |
int i; | |
printf("Array dump [%2d]: ", arr_len); | |
for (i = 0 ; i < arr_len; i++) { | |
printf("[%2d] %2d ", i, arr[i]); | |
} |
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> | |
#include <stdlib.h> | |
#include <string.h> | |
// Compile: | |
// Cross compile on Linux: | |
// open-watcom.owcc-dos -bdos -o HT_HEART.EXE HT_TANGXONG.C | |
// On openwatcom on DOS: | |
// wcl386 HT_TANGXONG.C |
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
I have a 1440p monitor with an old computer that has Intel HD 4000, which doesn't support outputtin to 1440p natively. I bought a high-end AMD graphics card and a high-end NVIDIA card, but they both don't work well one way or another. The damn AMD driver doesn't support audio, the NVIDIA... don't ask. | |
Anyway, I figured there is a way to do 1440p natively on Intel, you just have to have 55Hz. You'd have to have a Windows setup. | |
Follow this instruction, you should be able to get 2560x1440@55Hz on Windows | |
https://www.notebookcheck.net/2560x1440-or-2560x1600-via-HDMI.92840.0.html | |
If that works, export your edid using Moninfo: |
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
#!/bin/bash | |
# This script allows you to chroot ("work on") | |
# the raspbian sd card as if it's the raspberry pi | |
# on your Ubuntu desktop/laptop | |
# just much faster and more convenient | |
# credits: https://gist.github.com/jkullick/9b02c2061fbdf4a6c4e8a78f1312a689 | |
# make sure you have issued |
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
<div id="disqus_thread"></div> | |
<script> | |
window.addEventListener('message', receiveMessage, false); | |
function receiveMessage(event) | |
{ | |
if (event.data) { | |
var msg; | |
try { | |
msg = JSON.parse(event.data); | |
} catch (err) { |
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
AR71xx | |
make image PROFILE=WNDR3700 PACKAGES="base-files busybox dnsmasq dropbear firewall fstools hostapd-common ip ip6tables iptables iptables-mod-conntrack-extra iptables-mod-ipopt iw jshn jsonfilter kernel kmod-ath kmod-ath9k kmod-ath9k-common kmod-cfg80211 kmod-crypto-aes kmod-crypto-arc4 kmod-crypto-core kmod-gpio-button-hotplug kmod-ifb kmod-ip6tables kmod-ipt-conntrack kmod-ipt-conntrack-extra kmod-ipt-core kmod-ipt-ipopt kmod-ipt-nat kmod-ipv6 kmod-lib-crc-ccitt kmod-mac80211 kmod-nf-conntrack kmod-nf-conntrack6 kmod-nf-ipt kmod-nf-ipt6 kmod-nf-nat kmod-nf-nathelper kmod-ppp kmod-pppoe kmod-pppox kmod-sched kmod-sched-core kmod-slhc libblobmsg-json libc libgcc libip4tc libip6tc libiwinfo libiwinfo-lua libjson-c libjson-script liblua libnl-tiny libubox libubus libubus-lua libuci libuci-lua libxtables lua luci luci-app-firewall luci-app-sqm luci-base luci-lib-ip luci-lib-nixio luci-mod-admin-full luci-proto-ipv6 luci-proto-ppp luci-theme-bootstrap mtd netifd odhcp6c odhcpd opkg procd rpcd rssileds sqm- |
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
/* | |
Button / SolderingIronBOff | |
Automatically turns off soldering station. | |
Turns on the power switch tail (also the LED) | |
connected to digital pin 1.6, | |
when pressing a pushbutton attached to pin 2. | |
Automatically times out when it reaches a threshold. | |
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
vim files/etc/uci-defaults/set-wifinetwork.sh | |
#!/bin/sh | |
uci set wireless.@wifi-device[0].disabled=0 | |
uci set wireless.@wifi-iface[0].ssid="HAB.education Classroom Wireless" | |
uci set wireless.@wifi-iface[0].encryption=psk2 | |
uci set wireless.@wifi-iface[0].key="spacecadet" | |
uci commit wireless | |
exit 0 |
NewerOlder