Skip to content

Instantly share code, notes, and snippets.

View pdp7's full-sized avatar
💭
Linux on RISC-V

Drew Fustini pdp7

💭
Linux on RISC-V
View GitHub Profile
@pdp7
pdp7 / lighthouse notes 2015-12-14
Created December 14, 2015 17:55 — forked from bonnieking/lighthouse notes 2015-12-14
lighthouse notes 2015-12-14
########################################################################
root@outernet:~# find /sys |grep bcm
/sys/bus/sdio/drivers/bcmsdh_sdmmc
/sys/bus/sdio/drivers/bcmsdh_sdmmc/bind
/sys/bus/sdio/drivers/bcmsdh_sdmmc/sdio:0001:1
/sys/bus/sdio/drivers/bcmsdh_sdmmc/sdio:0001:2
/sys/bus/sdio/drivers/bcmsdh_sdmmc/uevent
/sys/bus/sdio/drivers/bcmsdh_sdmmc/unbind
root@outernet:~# find /sys -type f |grep broadcm
@grizmio
grizmio / gist:bc752dd070652f21266b
Created November 17, 2015 19:53
Patch to make Adafruit's ADC python libraries works with ubuntu xenial, kernel 4
diff --git a/source/c_adc.c b/source/c_adc.c
index e0c754c..5269407 100644
--- a/source/c_adc.c
+++ b/source/c_adc.c
@@ -30,29 +30,28 @@ SOFTWARE.
#include "c_adc.h"
#include "common.h"
-char adc_prefix_dir[40];
+char adc_prefix_dir[49];
anonymous
anonymous / sources.list
Created November 11, 2015 14:50
BeagleBone Black: Tor exit node config
# path of this file: /etc/apt/sources.list
deb http://ftp.us.debian.org/debian/ jessie main contrib non-free
#deb-src http://ftp.us.debian.org/debian/ jessie main contrib non-free
deb http://ftp.us.debian.org/debian/ jessie-updates main contrib non-free
#deb-src http://ftp.us.debian.org/debian/ jessie-updates main contrib non-free
deb http://security.debian.org/ jessie/updates main contrib non-free
#deb-src http://security.debian.org/ jessie/updates main contrib non-free
/*
* MCP23S08 SPI/GPIO gpio expander driver
*/
#include <linux/kernel.h>
#include <linux/device.h>
#include <linux/mutex.h>
#include <linux/module.h>
#include <linux/gpio.h>
#include <linux/i2c.h>
#/etc/systemd/system/geocache-shmile.service
[Unit]
Description=shmile for geocache
[Service]
Type=simple
WorkingDirectory=/home/debian/shmile
ExecStart=/home/debian/shmile/node_modules/coffee-script/bin/coffee /home/debian/shmile/app.coffee
#/bin/bash
if [$1 == ""];then
echo Need a file name!
else
fswebcam --no-banner --rotate -90 -v -r 768x1024 --jpeg 95 -D 1 $1.jpg
feh -F $1.jpg
fi
geocache.service:
< https://gist.github.com/Technicus/7b7ce39254bc36711add >
statuspin_1.sh:
< https://gist.github.com/Technicus/b17d754550592ced9094 >
statuspin_0.sh:
< https://gist.github.com/Technicus/97fa961f4a3db6131a1d >
geocache.service - status:
@kyledrake
kyledrake / ferengi-plan.txt
Last active April 6, 2024 00:30
How to throttle the FCC to dial up modem speeds on your website using Nginx
# The blog post that started it all: https://neocities.org/blog/the-fcc-is-now-rate-limited
#
# Current known FCC address ranges:
# https://news.ycombinator.com/item?id=7716915
#
# Confirm/locate FCC IP ranges with this: http://whois.arin.net/rest/net/NET-165-135-0-0-1/pft
#
# In your nginx.conf:
location / {
@davidzchen
davidzchen / sample-linux.c
Last active January 19, 2024 21:20
Sample C code using the Linux kernel coding style
/*
* Sample file using the Linux kernel coding convention.
*
* https://www.kernel.org/doc/Documentation/CodingStyle
*
* General rules:
* - Indents are tabs and must be 8 spaces wide.
* - Each line must be at most 80 characters long.
* - Use C-style comments.
* - File names should be lower-case.c
anonymous
anonymous / Bonescript_server.js
Created August 27, 2013 04:26
Updated server.js file for Bone101 (Bonescript) application for BeagleBone Black to enable HTTP Digest Authentication by Dan/Drew @ PS1
// Copyright (C) 2011 - Texas Instruments, Jason Kridner
//
var fs = require('fs');
var child_process = require('child_process');
var http = require('http');
var url = require('url');
var path = require('path');
var winston = require('winston');
var b = require('../bonescript');
var socketio = require('socket.io');