Skip to content

Instantly share code, notes, and snippets.

View robsalasco's full-sized avatar
🏠
Working from home

Roberto Salas robsalasco

🏠
Working from home
View GitHub Profile
@estysdesu
estysdesu / readme.md
Last active December 9, 2023 20:39
[Kindle 4: Jailbreak and SSH] #kindle #ssh #jailbreak

Following this guide: https://wiki.mobileread.com/wiki/Kindle4NTHacking#SSH.
Using Kindle 4.1 and macOS 10.14.

  1. Connect the Kindle. It should be recognized as a USB Mass Storage Device.
  2. Download the jailbreak archive
  3. Copy data.tar.gz, ENABLE_DIAGS, and diagnostic_logs to the Kindle folder.
  4. Restart the Kindle into Diagnostics Mode.
  5. Reboot the Kindle from the Diagnostics Mode. Reboot screen should show jailbroken screensaver.
@mattpotts
mattpotts / macos.md
Last active July 31, 2022 20:46
New macOS Setup

Old machine

  • Backup alfred preferences: cp '/Users/matt/Library/Application Support/Alfred/Alfred.alfredpreferences/preferences/features/websearch/prefs.plist' config:/alfred/websearch-prefs.plist
  • Backup iterm preferences (Profile, keymap, colors)
  • TODO roll all this into a script

SSH

@dephiros
dephiros / package.json
Created May 31, 2019 15:44
Webpack + Sapper + Tailwind
{
"scripts": {
"dev": "sapper dev",
"format:check": "prettier --check './**/*.{js,ts,css,html,svelte}'",
"format": "prettier --write './**/*.{js,ts,css,html,svelte}'",
"build": "NODE_ENV=production sapper build",
"export": "NODE_ENV=production sapper export",
"start": "node __sapper__/build",
"cy:run": "cypress run",
@wybiral
wybiral / noscript-tracking.go
Last active September 11, 2023 08:53
Tracking cursor position in real-time with remote monitoring (without JavaScript)
// Tracking cursor position in real-time without JavaScript
// Demo: https://twitter.com/davywtf/status/1124146339259002881
package main
import (
"fmt"
"net/http"
"strings"
)
@openfirmware
openfirmware / readme.markdown
Created March 28, 2019 19:29
ST_MakeValid and other functions on libspatialite/GDAL on MacOS with Homebrew
$ brew install liblwgeom
$ export LDFLAGS="-L/usr/local/opt/liblwgeom/lib"
$ export CPPFLAGS="-I/usr/local/opt/liblwgeom/include"
$ brew edit libspatialite
(add --enable-lwgeom to configure)
$ brew reinstall -s libspatialite
$ brew install -s gdal
@npearce
npearce / install-docker.md
Last active April 19, 2024 12:35
Amazon Linux 2 - install docker & docker-compose using 'sudo amazon-linux-extras' command

UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.

Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/

Docker CE Install

sudo amazon-linux-extras install docker
sudo service docker start
---
title: Glossary
output:
bookdown::pdf_document2:
template: two-col.latex
latex_engine: xelatex
number_sections: FALSE
toc: False
pandoc_args: ["--lua-filter", "sort_definition_list.lua"]
includes:
@jsomers
jsomers / websockets.md
Created September 27, 2018 12:50
Using websockets to easily build GUIs for Python programs

Using websockets to easily build GUIs for Python programs

I recently built a small agent-based model using Python and wanted to visualize the model in action. But as much as Python is an ideal tool for scientific computation (numpy, scipy, matplotlib), it's not as good for dynamic visualization (pygame?).

You know what's a very mature and flexible tool for drawing graphics? The DOM! For simple graphics you can use HTML and CSS; for more complicated stuff you can use Canvas, SVG, or WebGL. There are countless frameworks, libraries, and tutorials to help you draw exactly what you need. In my case, this was the animation I wanted:

high-priority

(Each row represents a "worker" in my model, and each rectangle represents a "task.")

@shenghaoyang
shenghaoyang / blueEnable_ALARM_non_mainline.md
Last active February 19, 2024 00:14
Bluetooth support on Raspberry Pis running Arch Linux ARM with non-mainline kernel.

#1 Update: Recent Rapsberry Pi (downstream) kernel dt-overlays now exposes a config option "krnbt" that negates the need for all this.

Relevant PRs: raspberrypi/linux#3682

Enabling bluetooth

[Pi 3B (Non-Plus) / Pi Zero W ONLY]

As of kernel package, linux-raspberrypi-4.14.59-1, support for notifying the kernel of the

## Figure 1
#download the dev version of cartography
devtools::install_github("riatelab/cartography")
library(sf)
library(cartography)
mtq <- st_read(system.file("shape/martinique.shp", package="cartography"))
mt1 <- mtq[3,]
mt2 <- getPencilLayer(mt1, size = 1000, lefthanded = T, buffer = 2000)
png(filename = "fig1.png", width = 474, height = 132, res = 100)
par(mfrow=c(1,3), mar = c(0,0,0,0))