Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Roberto Salas robsalasco

🏠
Working from home
View GitHub Profile
@obrl-soil
obrl-soil / tilt_stack_sf.R
Last active Aug 19, 2020
Tilted and stacked maps with sf
View tilt_stack_sf.R
# further to https://urbandemographics.blogspot.com/2016/04/creating-tilted-and-stacked-maps-in-r.html,
# an sf-friendly approach.
library(sf)
nc <- st_read(system.file('shape/nc.shp', package = 'sf'))
plot(nc)
sm <- matrix(c(2, 1.2, 0, 1), 2, 2)
@IanColdwater
IanColdwater / twittermute.txt
Last active Sep 3, 2021
Here are some terms to mute on Twitter to clean your timeline up a bit.
View twittermute.txt
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@jeffreycastro
jeffreycastro / heroku_pg_to_sqlite3.txt
Last active Jun 10, 2020
Import Heroku Postgres to SQLite3 in your local Rails
View heroku_pg_to_sqlite3.txt
### Disclaimer,
- datetime is not copied with the timezone difference. seems like the dates are saved in UTC so there will be difference with the datetime columns
---
in this guide,
postgres username = "jep"
postgres password = "jepjep"
@uribo
uribo / 01-file_download.R
Last active Sep 22, 2019
令和元年台風第15号に係る鉄道運行状況(千葉県)
View 01-file_download.R
library(drake)
library(dplyr)
library(purrr)
library(assertr)
library(tabulizer)
matrix_to_tbl <- function(data) {
data %>%
as.data.frame(stringsAsFactors = FALSE) %>%
janitor::clean_names() %>%
@frankgould
frankgould / btuart
Last active Aug 18, 2020
RPi4B files for bluetooth headsets on Arch Linux ARM 4.19
View btuart
#!/bin/sh
HCIATTACH=/usr/bin/hciattach
if grep -q "Pi 4" /proc/device-tree/model; then
BDADDR=
else
SERIAL=`cat /proc/device-tree/serial-number | cut -c9-`
B1=`echo $SERIAL | cut -c3-4`
B2=`echo $SERIAL | cut -c5-6`
B3=`echo $SERIAL | cut -c7-8`
@estysdesu
estysdesu / readme.md
Last active Aug 25, 2021
[Kindle 4: Jailbreak and SSH] #kindle #ssh #jailbreak
View readme.md

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

Jailbreak

  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 Jul 23, 2021
New macOS Setup
View macos.md

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
Webpack + Sapper + Tailwind
View package.json
{
"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 Jun 19, 2021
Tracking cursor position in real-time with remote monitoring (without JavaScript)
View noscript-tracking.go
// 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 Mar 28, 2019
ST_MakeValid and other functions on libspatialite/GDAL on MacOS with Homebrew
View readme.markdown
$ 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