Skip to content

Instantly share code, notes, and snippets.

@metalinspired
metalinspired / main.cpp
Last active April 24, 2024 13:55
TMC2209 UART
/**
* Author Milan Divkovic
*
* You can control the motor with following commands:
* 0: Disables the motor
* 1: Enables the motor
* + or -: Increase or decrease speed in respect to rotation direction
*/
#include <Arduino.h>
@sdlee3
sdlee3 / UIDevice_Jaibroken.swift
Last active April 24, 2024 13:55
Jailbroken and Simulator detection
import Foundation
import UIKit
import MachO
extension UIDevice {
var isSimulator: Bool {
return TARGET_OS_SIMULATOR != 0
}
@biochem-fan
biochem-fan / NOTES.md
Last active April 24, 2024 13:54
Warp-RELION4-M Protocol
@jboner
jboner / latency.txt
Last active April 24, 2024 13:53
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@esgomezm
esgomezm / dl4miceverywhere-practical-EBI-EMBL.md
Last active April 24, 2024 13:52
EBI-EMBL Microscopy data analysis course - DL4MicEverywhere practical session
@davidteren
davidteren / nerd_fonts.md
Last active April 24, 2024 13:52
Install Nerd Fonts via Homebrew [updated & fixed]
@arshednabeel
arshednabeel / vicsek.py
Last active April 24, 2024 13:52
A minimal implementation of the Vicsek model in ~50 lines of code
import numpy as np
from tqdm import trange
def get_neighbour_matrix(x, L, R):
dx = np.subtract.outer(x[:, 0], x[:, 0])
dy = np.subtract.outer(x[:, 1], x[:, 1])
dx[dx > (L / 2) ** 2] -= (L / 2) ** 2
dy[dy > (L / 2) ** 2] -= (L / 2) ** 2
pair_dist = dx ** 2 + dy ** 2

Reference: List of iOS App URL Scheme Names & Paths for Shortcuts

Author:

Saved on: 2021-03-19, 15:52

If you've ever customized your app icons or played around with Shortcuts (previously called Workflow), you probably know how important URL scheme names are. Nearly all iOS apps assign themselves one of these names, and you need to know them if you want to add custom icons to your home screen or create a Shortcuts workflow that opens an app on your iPhone up. Finding the URL scheme name, also known as a URI scheme, for a particular app is not easy. First, you have to download the IPA file for the app — a difficult task since the iTunes 12.7 update removed iOS apps from it. When you finally find the IPA, you have to turn it into a ZIP file, show the contents of the app package, then hunt for the specific PLIST file that contains the URL schemes. It's a lot of work.

This example

@Zoxive
Zoxive / gist:bcfc30e0518be6db8870efb12e16e8e4
Last active April 24, 2024 13:49
Favorite CSharp Analyzers
<PackageReference Include="SmartAnalyzers.CSharpExtensions.Annotations" Version="3.10.0" />
<PackageReference Include="AsyncSuffixAnalyzer" Version="1.0.6285.32977" PrivateAssets="All"/>
<PackageReference Include="Lindhart.Analyser.MissingAwaitWarning" Version="1.2.0" PrivateAssets="All"/>
<PackageReference Include="Microsoft.CodeAnalysis.FxCopAnalyzers" Version="2.9.7" PrivateAssets="All"/>
<PackageReference Include="AsyncFixer" Version="1.1.6" PrivateAssets="All"/>
<PackageReference Include="Roslynator.Analyzers" Version="2.2.0" PrivateAssets="All"/>
<PackageReference Include="Roslynator.CodeFixes" Version="2.0.0" PrivateAssets="All" />
<PackageReference Include="Nopen.NET" Version="1.0.0" PrivateAssets="All" />
<PackageReference Include="Apex.Analyzers.Immutable" Version="1.2.5" PrivateAssets="All" />
<PackageReference Include="Apex.Analyzers.Immutable.Attributes" Version="1.0.0" />
@myselfgautham
myselfgautham / ESPCameraServer.ino
Created April 24, 2024 13:37
A Camera Server For ESP32 AI Thinkers Camera Module With Support For Many Other Modules Serves Through WiFi
#include "esp_camera.h"
#include <WiFi.h>
#include "esp_timer.h"
#include "img_converters.h"
#include "Arduino.h"
#include "fb_gfx.h"
#include "soc/soc.h"
#include "soc/rtc_cntl_reg.h"
#include "esp_http_server.h"