Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

nodes:
- id: webcam
custom:
source: https://huggingface.co/datasets/dora-rs/dora-idefics2/raw/main/operators/opencv_stream.py
outputs:
- image
- id: idefics2
operator:
python: https://huggingface.co/datasets/dora-rs/dora-idefics2/raw/main/operators/idefics2_op.py
inputs:
@kepano
kepano / obsidian-web-clipper.js
Last active April 23, 2024 16:40
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
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 = "";
/* Optional folder name such as "Clippings/" */
@jacobshenning
jacobshenning / app.js
Last active April 23, 2024 16:39
An alpine datatable
// Alpine JS datatable
window.datatable = function (data) {
return {
source: data,
data: data,
// Pagination
current_page: 0,
items_per_page_value: 5,
@lamegaton
lamegaton / AdbCommands
Last active April 23, 2024 16:37 — forked from ernestkamara/AdbCommands
Adb useful commands list
== Adb Server
adb kill-server
adb start-server
== Adb Reboot
adb reboot
adb reboot recovery
adb reboot-bootloader
== Shell
@owaiswiz
owaiswiz / print_redundant_indexes.rb
Last active April 23, 2024 16:36
Print redundant indexes in a Rails app.
# Unnecessary indexes slows down writes and consumes additional storage and memory.
# Just paste this snippet in your Rails console (bundle exec rails c).
# And it will print all redundant indexes that are already covered by another index on the table:
# Table `pages`: index `site_idx` (site_id) already covered by `site_slug_idx` (site_id,slug)
# Table `optins`: index `list_idx` (list_id) already covered by `list_active_idx` (list_id,active)
ActiveRecord::Base.connection.tables.map do |table|
indexes = ActiveRecord::Base.connection.indexes(table).select(&:valid).reject(&:where)
@dbshanks
dbshanks / formik.js
Created August 4, 2020 01:29
Field 'as' option for Formik field to render Textarea with cols and rows
<Field
as='textarea'
name='comments'
id='comments'
cols='30'
rows='10'
// placeholder='comments'
className='bg-gray-100 p-2 px-4 placeholder-black w-4/12 mb-6'
/>
@revofusion
revofusion / rune.ts
Created September 27, 2023 01:13
Rune Scripts: PrefixVarint and Base 26 (A=1) Name
/**
Convert between rune symbols and values using Base 26 (A=1)
Similar rust implementation at https://github.com/ordinals/ord/blob/f3cae5400fdebf31bfd494a02c846a90ea12310d/src/sat.rs#L63
*/
class Rune {
constructor(public value: number) { }
public get name(): string {
let x = this.value;
@radist2s
radist2s / canvasMatte.html
Last active April 23, 2024 16:31
Simple Canvas cliping with anti aliasing by alpha channel of mask image or canvas shape.
<canvas id="show" width="300" height="300"></canvas>
@SkaTeMasTer
SkaTeMasTer / .bashrc
Last active April 23, 2024 16:27
Edit /home/pi/.bashrc to display MOTD and welcome screen
# via https://github.com/rosterloh/raspberry-pi/blob/master/configs/.bashrc
#
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth
# append to the history file, don't overwrite it