Skip to content

Instantly share code, notes, and snippets.

View csteinlehner's full-sized avatar

Christoph Steinlehner csteinlehner

View GitHub Profile
@csteinlehner
csteinlehner / temp_c_f.js
Last active August 10, 2022 16:56
Scriptable local temperature in F and C
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: red; icon-glyph: magic;
// OpenWeatherMap API 2.5 Key
const apiKey = "__YOUR_API_KEY__";
// Config sizes & colors
let detailFontSize = 40
let cColor = Color.white();
@proxium
proxium / Whatsapp-Android-To-iOS-Importer.md
Last active May 1, 2024 12:23
How do I transfer WhatsApp from Android to iOS without phone rooting? [verified method 24-Oct-2020]

Initially based on https://github.com/residentsummer/watoi

Migrate Whatsapp chats history from Android to iOS.

Caveats

Media files and shared locations are not imported (got placeholders instead)

Messages from contacts that changed ids (phone numbers) are not linked

import SwiftUI
import Combine
struct HMS {
var h: Int
var m: Int
var s: Int
}
struct ContentView: View {
@jimeh
jimeh / bluetooth_sleep.lua
Created January 29, 2019 01:16 — forked from ysimonson/bluetooth_sleep.lua
Hammerspoon script to disable bluetooth when the computer is put to sleep. Requires `blueutil` to be installed (`brew install blueutil`).
function bluetooth(power)
print("Setting bluetooth to " .. power)
result = hs.execute("blueutil --power " .. power)
if result.rc ~= 0 then
print("Unexpected result executing `blueutil`: rc=" .. result.rc .. " type=" .. result.type .. " output=" .. result.output)
end
end
function f(event)
@moshen
moshen / init.lua
Created September 3, 2015 01:19
My hammerspoon configuration
-- Auto-reload config
function reloadConfig(files)
doReload = false
for _,file in pairs(files) do
if file:sub(-4) == ".lua" then
doReload = true
end
end
if doReload then
hs.reload()
@amercier
amercier / synology-scheduled-tasks.md
Last active January 10, 2024 08:31
Turn leds on/off on Synology DiskStation

Synology scheduled tasks

Usage

Go to Control Panel / Task Scheduler and add the content of these scripts as root scripts.

Leds

@patriciogonzalezvivo
patriciogonzalezvivo / GLSL-Noise.md
Last active July 24, 2024 14:58
GLSL Noise Algorithms

Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);