Skip to content

Instantly share code, notes, and snippets.

@cemerson
cemerson / archive.org-scanned-book-downloader-bookmarklet.md
Last active May 20, 2024 02:30
Archive.org Scanned Book Downloader Bookmarklet

Archive.org Scanned Book Downloader Bookmarklet

A simple "1-click" javascript approach to downloading a scanned book from archive.org to read at your leisure on the device of your choosing w/out having to manually screenshot every pages of the book by hand. In short it's a glorified "Save Image As..." approach but consolidated down to "1 click". BTW there may be a much better option than this out there - I just built this as an autistic project to see if it would work.

Demo Video

Archive.org SBDL Demo

Obligatory Legal/Disclaimer:

By using this script you agree to delete all book files/images after your 1 hour or 14 days is up! I don't support using this script for any other use cases. After all, none of us have ever kept a library book past it's return date, right?

@torgeros
torgeros / iptsd.conf
Last active May 20, 2024 02:27
surface-linux IPTSD Config for Surface Pro 5
# modified from original file by @torgeros
# config file is located in /etc/iptsd.conf
[Config]
##
## The following values are device specific and will be loaded from /usr/share/iptsd
## Only set them if you need to provide custom values for new devices that are not yet supported
##
# InvertX = false
# InvertY = false

DW3000 "missing manual" notes

Overall

The DW3000 is an exciting part, available as a convenient Arduino-shield eval board with good distribution. HOWEVER, this is NOT a "maker friendly" part with SparkFun or Adafruit type tutorials and examples! It is a sophisticated radio that can be the heart of a positioning system, but you have to do quite a lot of heavy lifting to get there.

For basic use, the older-but-still-good DW1000 may be a better choice; interface libraries are available for Arduino and Raspberry Pi. Or look into packaged location-system vendors, like Estimote, Pozyx, Ubitrack and many others

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Custom Scrollbar Windows 95 Style</title>
<style>
body {
margin: 0;
font-family: Arial, sans-serif;
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Custom Scrollbar Windows 95 Style</title>
<style>
body {
margin: 0;
font-family: Arial, sans-serif;
@sdwru
sdwru / Laravel-websockets-on-Laravel-API-backend+Laravel-Echo-on-Vue.js-front-end-on-different-server-domain-using-private-channel.md
Last active May 20, 2024 02:19
Laravel-websockets on Laravel API backend + Laravel Echo on Vue.js front end on different server/domain using private channel.md

These are my notes on how I got all the basics working end to end.

Laravel API backend and Vue.js frontend are 2 different servers on different public IP addresses and different domains. I am using pure Vue.js on the front end. Most instructions assume Laravel Vue.js is being used which is structured slightly different with different file names and directories.

  • Laravel API backend domain name (api.somedomain.com)
  • Vue.js frontend domain name (client.somedomain.com)

No database is needed for any of this to work using sync queue. That is only needed in production if/when you use a database queue.


@TheGreyGhost
TheGreyGhost / KeyBindingInterceptor.java
Last active May 20, 2024 02:16
KeyBindingInterceptor (for Minecraft Forge mods). The purpose of this class is to intercept key presses (especially left and right mouse button clicks) before they are passed to the vanilla code. This gives the mod code greater flexibility in responding to them. For example- a staff which, when held: (1) left click performs an immediate attack (…
package speedytools.client;
/**
* The purpose of this class is to intercept key presses (especially left and right mouse button clicks) and allow
* greater flexibility in responding to them.
* The class replaces KeyBindings in GameSettings. When interception is on:
* .isPressed() is overridden to return false so that the vanilla code never receives the clicks.
* .pressed is always false.
* The true .isPressed() and .pressed are available using .retrieveClick() and .isKeyDown()
* Usage:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Custom Scrollbar Windows 95 Style</title>
<style>
body {
margin: 0;
font-family: Arial, sans-serif;
@VictorTaelin
VictorTaelin / bhtt.md
Created January 26, 2024 03:37
Brief History of Type Theory

Brief history of Type Theory - Human Timeline

All started around 1930, when mathematicians discovered the λ-calculus. It was Turing complete, so we wrote programs on it. Everything was great, until the first program crashed and the first paradox was found. The world was in flames, so humans looked for better.

Around 1940, the simple type was discovered. It solved everything: math was consistent again, programs stopped crashing. People were happy, until someone tried to make a linked list.

"Why do I need to duplicate my entire codebase?" - asked the angry developers.

At this point, half of humanity gave up on types. A duck religion was born. The other half looked for better.

@ogabrielp
ogabrielp / react-parcel.sh
Last active May 20, 2024 02:06
Setup minimal React with Parcel
# References:
# 1. https://blog.logrocket.com/build-component-library-react-typescript/
# 2. https://parceljs.org/recipes/react/
react-parcel () {
# Create folder
mkdir "$1" && cd "$_"
# Initialize package.json and git local repo
npm init -y