Skip to content

Instantly share code, notes, and snippets.

@andersevenrud
andersevenrud / README.md
Last active April 23, 2024 21:30
Strømpris Sensor i Home Assistant

Strømpris i Home Assistant

Det er mulig å legge til strømpris som en sensor i Home Assistant takket være https://www.hvakosterstrommen.no/ .

Dette vil ikke reflektere ditt abonnement, men gjør det enkelt å få et estimat i forbruksdata / energi panelet.

Konfigurasjon

Tilgjenglige områder:

@simonrenger
simonrenger / memoy_managment_cpp_resource_list.md
Last active April 23, 2024 21:30
C++ Memory Management Resource List
# tar_custom_format_arrow.R
# store as parquet, load as an Arrow Table
format_arrow_table <- function() {targets::tar_format(
read = function(path) {arrow::read_parquet(path, as_data_frame = FALSE)},
write = function(object, path) {arrow::write_parquet(object, path, version = "2.0")},
marshal = function(object) as.data.frame(object),
unmarshal = function(object) arrow::Table$create(object),
repository = "default"
@shoaloak
shoaloak / fix-entitlements.sh
Last active April 23, 2024 21:24
This script automates the process of granting specific entitlements to a set of iOS binaries, resolving issues related to 'Operation not permitted' errors, e.g., when accessing /private/var/mobile/Containers.
#!/bin/bash
# Author: Shoaloak (Axel Koolhaas) 2024
# Description: Fix iOS binary entitlements/access for "Operation not permitted"
ENTITLEMENT="com.apple.private.security.container-manager"
binaries=("sh" "bash" "zsh" "dash" # Shell
"ls" "cat" "find" "cp" "mv" # File management
"rm" "mkdir" "rmdir" "touch"
"file" "ln" "du" "scp"
"chmod" "chown" "chgrp" # Permissions
@ramzesenok
ramzesenok / CustomSwipeActions.swift
Created March 20, 2022 17:19
SwiftUI custom swipe actions cause there are none outside of the List
struct ContentView: View {
@State var titles = ["Cell #1", "Cell #2", "Cell #3", "Cell #4"]
var body: some View {
NavigationView {
ScrollView {
VStack(spacing: 0) {
ForEach(self.titles, id: \.self) { title in
HStack {
Text(title)
term description reference
Phase ADNI phase link
ID Record ID link
RID Record ID link
PTID Patient ID link
SITEID Site ID link
V
@jeffochoa
jeffochoa / 1.ProcessClass.php
Last active April 23, 2024 21:22
Understanding Laravel pipelines
<?php
namespace App\Features;
use App\Features\FirstTask;
use App\Features\SecondTask;
use Illuminate\Pipeline\Pipeline;
// *Naming things is hard* ... So, this is a class called `ProcessClass` that `run()` some text ¯\_(ツ)_/¯
class ProcessClass
@MightyPork
MightyPork / usb_hid_keys.h
Last active April 23, 2024 21:20
USB HID Keyboard scan codes
/**
* USB HID Keyboard scan codes as per USB spec 1.11
* plus some additional codes
*
* Created by MightyPork, 2016
* Public domain
*
* Adapted from:
* https://source.android.com/devices/input/keyboard-devices.html
*/
@evantoli
evantoli / GitConfigHttpProxy.md
Last active April 23, 2024 21:19
Configure Git to use a proxy

Configure Git to use a proxy

In Brief

You may need to configure a proxy server if you're having trouble cloning or fetching from a remote repository or getting an error like unable to access '...' Couldn't resolve host '...'.

Consider something like: