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
@peyanski
peyanski / ESPHome-YAML-ld2410-esp32.yaml
Last active April 14, 2024 17:19
Use this code to make your LD2410 sensor to work with ESP32 or ESP8266 board
esphome:
name: ld2410-esp32
friendly_name: ld2410-esp32
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
@rain-1
rain-1 / LLM.md
Last active April 24, 2024 08:25
LLM Introduction: Learn Language Models

Purpose

Bootstrap knowledge of LLMs ASAP. With a bias/focus to GPT.

Avoid being a link dump. Try to provide only valuable well tuned information.

Prelude

Neural network links before starting with transformers.

@joetifa2003
joetifa2003 / +page.svelte
Created January 17, 2023 00:10
Svelte form loading
<Form action="?/deleteTodo" let:submitting>
<input type="hidden" name="todoId" value={todo.id} />
<button type="submit" disabled={submitting}>Delete</button>
</Form>
@radiantly
radiantly / noMangleGoogle.user.js
Last active December 28, 2023 04:31
Prevent Google from mangling links on the search results when clicking or copying on Firefox
// ==UserScript==
// @name Prevent link mangling on Google
// @namespace LordBusiness.LMG
// @match https://www.google.com/search
// @grant none
// @version 1.1
// @author radiantly
// @description Prevent google from mangling the link when copying or clicking the link on Firefox
// ==/UserScript==
@Asseel-Naji
Asseel-Naji / obsidian-web-clipper.js
Last active March 26, 2024 22:29 — forked from kepano/obsidian-web-clipper.js
Prompt_Obsidian Bookmarklet to clip pages
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "Brain";
/* Optional folder name such as "Clippings/" */
@obrl-soil
obrl-soil / tilt_stack_sf.R
Last active December 7, 2023 15:29
Tilted and stacked maps with sf
# 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 April 22, 2024 17:26
Here are some terms to mute on Twitter to clean your timeline up a bit.
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 September 12, 2022 13:18
Import Heroku Postgres to SQLite3 in your local Rails
### 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 September 22, 2019 18:48
令和元年台風第15号に係る鉄道運行状況(千葉県)
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 January 23, 2022 20:34
RPi4B files for bluetooth headsets on Arch Linux ARM 4.19
#!/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`