Skip to content

Instantly share code, notes, and snippets.

@sifatulrabbi
sifatulrabbi / bd_districts_areas.json
Created January 30, 2022 12:40
List of all the districts with areas of Bangladesh
[
{
"district": "Dhaka",
"areas": [
"Mohammadpur (Dhaka)",
"Dhanmondi - Rd 3",
"Gulshan",
"Kallyanpur",
"Shyamoli",
"Adabor",
@hakib
hakib / time_limited_paginator.py
Last active April 23, 2024 21:31
CountTimeoutLimitPaginator - Paginator that enforced a timeout on the count operation.
class TimeLimitedPaginator(Paginator):
"""
Paginator that enforced a timeout on the count operation.
When the timeout is reached a "fake" large value is returned instead,
Why does this hack exist? On every admin list view, Django issues a
COUNT on the full queryset. There is no simple workaround. On big tables,
this COUNT is extremely slow and makes things unbearable. This solution
is what we came up with.
"""
@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