Skip to content

Instantly share code, notes, and snippets.

View sjfricke's full-sized avatar

Spencer Fricke sjfricke

View GitHub Profile
@sjfricke
sjfricke / index.html
Created May 26, 2023 16:01
Simpler Server Port Demo
<html>
<head>
<style>
body {background-color: powderblue;}
h1 {color: blue;}
</style>
</head>
<body onload="GetMagicNumber()">
<h1 id="message"></h1>
@sjfricke
sjfricke / .emacs
Created February 23, 2019 17:50
Emacs setup for JavaScript
;; ## Packages to Install ##
;; js2-mode
;; js2-refactor
;; xref-js2
;; sudo npm install -g tern
;; company-tern
(require 'package)
(let* ((no-ssl (and (memq system-type '(windows-nt ms-dos))
(not (gnutls-available-p))))
@sjfricke
sjfricke / ChromeBookDev.md
Last active December 26, 2023 01:53
Configuring Chromebook for Development

These instructions will not work on Chromebooks with an ARM processor. If you have an ARM processor then you cannot install Chromebrew to get git. You'll need to instead install crouton. Here are instructions that you can follow: https://github.com/macton/arch-linux-install-notes/tree/master/arm-chromebook-chroot

@Note: This is a fork from /erikpmp who has left github, here is a fork I took before thankfully

Configuring Chromebook for Development

After a full Sunday of trial and error, and stepping through many semi-complete or dated blog posts explaining how to do this, I was able to get the Chromebook into developer mode, install git, Node.js, and NPM.

Here's what I did...

@sjfricke
sjfricke / Native_AndroidManifest.xml
Created June 8, 2018 22:39
AndroidManifest.xml settings for a pure native code
<!-- This .apk has no Java code itself, so set hasCode to false. -->
<application
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:hasCode="false"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen">
@sjfricke
sjfricke / get_windows_wireless_pass.bat
Created May 18, 2018 09:49
Find the password to wireless network connected with Windows, replace <SSID> with network
netsh wlan show profile <SSID> key=clear | findstr "Key Content"
@sjfricke
sjfricke / accel.c
Last active March 4, 2018 06:27
Accelerometer sensor Grove kit
#include "accel.h"
void AccelSetup(int bus) {
uint8_t modeReg;
I2cOpen(bus);
I2cSetSlave(bus, 0x4c);
I2cReadByte(bus, MMA7660_REG_MODE, &modeReg);
@sjfricke
sjfricke / test.c
Created March 4, 2018 01:28
ads1115 demo test
// gcc test.c -lwiringPi -o test
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <wiringPi.h>
#include <ads1115.h>
#define MY_BASE 2222
#define JOY_RX 0
@sjfricke
sjfricke / config.txt
Last active February 25, 2022 18:15
Waveshare 4 inch HDMI LCD display for Raspberry Pi Quick Start - Append to /boot/config.txt
# Display Monitor Timings - DMT
hdmi_group=2
# CVT (coordinated video timings)
hdmi_mode=87
# hdmi_cvt=<width> <height> <framerate> <aspect> <margins> <interlace> <rb>
## width (required) width in pixels
## height (required) height in pixels
## framerate (required) framerate in Hz
@sjfricke
sjfricke / Simple_HTML_Form.html
Created January 30, 2018 16:05
Pure HTML form of the most simplest form
<!DOCTYPE html>
<html>
<head>
<title>Simple HTML Form</title>
<style>
body {
text-align: center;
}
#main {
@sjfricke
sjfricke / wifi_scan.c
Created January 19, 2018 18:29
Dragonboard 410c script to scan the wifi around you and display information
/* apt install libiw-dev
* gcc wifi_scan.c -liw -o wifi_scan
* ./wifi_scan
*
* Docs: http://docs.ros.org/jade/api/heatmap/html/iwlib_8h.html
*/
#include <stdio.h>
#include <time.h>
#include <iwlib.h>