Skip to content

Instantly share code, notes, and snippets.

@Paraphraser
Paraphraser / Docker+OctoPrint - When your 3D printer turns on and off.md
Last active April 16, 2024 06:28
IOTstack+OctoPrint: When your 3D printer turns on and off

octoprint-docker: when your 3D printer turns on and off

Task goals

  • Keep the OctoPrint Docker container service running even when your printer is switched off:

    • GCODE files can still be uploaded
    • Plugins can still be updated
@amiranagram
amiranagram / select2.blade.php
Created June 29, 2021 13:51
Select2 multiple - Livewire/Alpine
<div
x-data="{
model: @entangle($attributes->wire('model')),
}"
x-init="
select2 = $($refs.select)
.not('.select2-hidden-accessible')
.select2({
theme: 'bootstrap',
dropdownAutoWidth: true,
@fredsiika
fredsiika / sass-cheatsheet.md
Last active April 16, 2024 06:25
A high-level Sass (SCSS) cheatsheet for the most important functionality features of Sass.
@FelixZY
FelixZY / supabase_api_auth.sql
Last active April 16, 2024 06:25
How to configure Supabase (https://supabase.com/) to generate and accept API tokens.
-- Token Based API Access for Supabase
--
-- How to configure Supabase (https://supabase.com/) to generate and accept API tokens.
--
-- (c) 2022 Felix Zedén Yverås
-- Provided under the MIT license (https://spdx.org/licenses/MIT.html)
--
-- Disclaimer: This file is formatted using pg_format. I'm not happy with the result but
-- prefer to follow a tool over going by personal taste.
--
@0xdevalias
0xdevalias / converting-json-to-openapi-swagger-spec.md
Created June 2, 2023 01:09
Exploring tools that allow converting a JSON response automagically into an OpenAPI / Swagger spec.

Converting JSON to OpenAPI / Swagger spec

Exploring tools that allow converting a JSON response automagically into an OpenAPI / Swagger spec.

Test JSON Response

{
    "accounts": {
        "default": {
@saurabh85mahajan
saurabh85mahajan / alpine-select.blade.php
Last active April 16, 2024 06:23
Select2 with Alpine
@props(['field', 'options', 'selected' => ''])
<div {{ $attributes->merge(['class' => 'mt-4 flex-1']) }} x-data="data()" x-init="setInitial({{$selected}})">
<input type="hidden" :value="selected.value" name="{{$field}}">
<x-input
class="w-1/2"
type="search"
x-model="search"
placeholder="Click to search..."
@click="showOptions"
@ninanung
ninanung / forMe2.md
Last active April 16, 2024 06:21
사실은 내가 보기위한 마크다운 문법설명서 - 2. 리스트와 인용구

2.리스트와 인용구(BlockQuote)

2-1.리스트

리스트는 점점 작은 부분을 설명할 때 사용합니다. 예를 들면

1.사람의 몸
1-1.머리
1-1-1.뇌
뇌는 말랑말랑하다. 그러하다
1-2.다리

@moeyua
moeyua / collection.md
Last active April 16, 2024 06:20
由 Moeyua 搜集、整理、维护的、个人自用的收藏列表。

Collection

这里是由 Moeyua 搜集、整理、维护的、个人自用的收藏列表。

工具

一些在线的工具,可能是日常会用到的工具,也可能是开发相关的工具

  • bookmark.style - 可以将任意链接转换生成可分享的图片。
  • tldraw - 一个画图的地方。
@palkan
palkan / README.md
Created January 24, 2022 13:29
Rails boot time profiling

Add the following to application.rb:

$icallbacks = []
$icallbacks.define_singleton_method(:print) do
  puts sort_by { |(a, b)| -b }.map { |(a, b)| "#{b}\t\t#{a}" }.join("\n")
end

ActiveSupport::Notifications.subscribe("load_config_initializer.railties") do |event|
 $icallbacks &lt;&lt; [event.payload[:initializer], event.duration]
@glenkusuma
glenkusuma / install-zsh-windows-git-bash.md
Last active April 16, 2024 06:17 — forked from fworks/install-zsh-windows-git-bash.md
Zsh / Oh-my-zsh on Windows Git Bash