Skip to content

Instantly share code, notes, and snippets.

@rsms
rsms / macos-distribution.md
Created May 13, 2024 18:27
macOS distribution — code signing, notarization, quarantine, distribution vehicles
@odats
odats / merging_line_segments.py
Created August 10, 2017 12:41
Implementation of merging line segments by TAVARES and PADILHA
# TAVARES and PADILHA approach
def merge_line_segments(line_i, line_j, use_log=False):
# line distance
line_i_length = math.hypot(line_i[1][0] - line_i[0][0], line_i[1][1] - line_i[0][1])
line_j_length = math.hypot(line_j[1][0] - line_j[0][0], line_j[1][1] - line_j[0][1])
# centroids
Xg = line_i_length*(line_i[0][0]+line_i[1][0]) + line_j_length*(line_j[0][0]+line_j[1][0])
Xg /= 2 * (line_i_length + line_j_length)
@KarlRamstedt
KarlRamstedt / FirstPersonCameraRotation.cs
Created January 8, 2020 10:17
A simple First Person Camera rotation script for Unity.
using UnityEngine;
/// <summary>
/// A simple FPP (First Person Perspective) camera rotation script.
/// Like those found in most FPS (First Person Shooter) games.
/// </summary>
public class FirstPersonCameraRotation : MonoBehaviour {
public float Sensitivity {
get { return sensitivity; }
csrutil disable
sudo nvram boot-args="intcoproc_unrestricted=1 kext-dev-mode=1 amfi_allow_any_signature=1 amfi_unrestrict_task_for_pid=1 PE_i_can_has_debugger=1 cs_enforcement_disable=1 amfi_get_out_of_my_way=1 amfi=0xff cs_debug=1 ipc_control_port_options=0"
sudo spctl --global-disable
sudo defaults write /Library/Preferences/com.apple.security GKAutoRearm -bool NO
sudo defaults write /Library/Preferences/com.apple.security.coderequirements Entitlements -string always
sudo defaults write /Library/Preferences/com.apple.security.coderequirements AllowUnsafeDynamicLinking -bool YES
sudo defaults write /Library/Preferences/com.apple.security.libraryvalidation.plist DisableLibraryValidation -bool YES
defaults write com.apple.loginwindow DisableScreenLockImmediate -bool yes
@lydonchandra
lydonchandra / LocalDB Reset
Last active May 13, 2024 18:33 — forked from hanssens/LocalDB Reset
Reset SQL's LocalDB, after corrupt rights or other problems.
# After problems with a company-wide ActiveDirectory shaker, all (local) SQL Server instances were FUBAR.
# This 'resets' the LocalDB sql instance.
sqllocaldb stop MSSQLLocalDB -k
sqllocaldb delete MSSQLLocalDB
sqllocaldb create MSSQLLocalDB
sqllocaldb start MSSQLLocalDB
@JessiG2319
JessiG2319 / hasFragileUserData.md
Created May 13, 2024 18:29 — forked from agnostic-apollo/hasFragileUserData.md
Android hasFragileUserData AndroidManifest.xml flag

The hasFragileUserData flag can be added to the application node of AndroidManifest.xml. If its value is true, then when the user uninstalls the app, a prompt will be shown to the user asking him whether to keep the app's data.

<application
	...
    android:hasFragileUserData="true" tools:targetApi="q">
...
</application>
@Aschen
Aschen / tutorial_softether_client.md
Last active May 13, 2024 18:30
Tutorial SoftEther Client (Ubuntu)

SoftEther Client

Download and install

Go to http://www.softether-download.com/files/softether and download SoftEther Client for the right architecture.

> cd /tmp
> wget http://www.softether-download.com/files/softether/v4.18-9570-rtm-2015.07.26-tree/Linux/SoftEther_VPN_Client/64bit_-_Intel_x64_or_AMD64/softether-vpnclient-v4.18-9570-rtm-2015.07.26-linux-x64-64bit.tar.gz
> tar xf softether-vpnclient-v4.18-9570-rtm-2015.07.26-linux-x64-64bit.tar.gz
@CHIZI-0618
CHIZI-0618 / PuerNya_sing-box_fakeip_client_config.jsonc
Last active May 13, 2024 18:30
sing-box 带有 Proxy Providers 的客户端配置示例
{
"log": {
"level": "info",
"output": "sing-box.log",
"timestamp": true
},
"dns": {
"servers": [
{
"tag": "cloudflare",
@AbhieSpeaks
AbhieSpeaks / dev-setup.md
Last active May 13, 2024 18:30 — forked from leodutra/-setup-windows-wsl-devenv.md
Development environment setup: Installing WSL2, Hyper, ZSH, VSCode, OhMyZsh

Installing Windows Subsystem for Linux 2, Hyper, ZSH, Node.js and VSCode extensions

Preview

Requirements

Steps