Skip to content

Instantly share code, notes, and snippets.

@mathiassoeholm
mathiassoeholm / TubeRenderer.cs
Last active May 7, 2024 11:54
Similar to Unity's LineRenderer, but renders a cylindrical mesh.
// Author: Mathias Soeholm
// Date: 05/10/2016
// No license, do whatever you want with this script
using UnityEngine;
using UnityEngine.Serialization;
[ExecuteInEditMode]
public class TubeRenderer : MonoBehaviour
{
[SerializeField] Vector3[] _positions;
@yaleiyale
yaleiyale / ClashVergeParser.js
Last active May 7, 2024 11:54
clash verge 内统一多订阅个文件的分流规则
function main(params) {
if (!params.proxies) return params
let proxies = []
params.proxies.forEach(proxy => {
proxies.push(proxy.name)
})
const groups = [
{
"name": "🚀不时之需",
"type": "select",
@Aizazahmed-7
Aizazahmed-7 / test.js
Last active May 7, 2024 11:54
Test DEmo
const isEven () => {
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 7, 2024 11:54
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@rams3sh
rams3sh / aws_regex_cheat_sheet
Last active May 7, 2024 11:53
Common AWS Related Regex (AWS)
ARN Base Pattern :-
arn:<aws_parition>:<aws_service>:[<aws_region>]:<account_id>:<root | resource_type>:/<resource_name>[/<sub_resource_names>...]
i. <aws_partition>
Regex - (aws|aws-us-gov|aws-cn)
ii. <aws_service> - No fixed pattern
iii. <aws_region> - No fixed pattern
Most of the regions occur in combination of 2 letter followed by "-" followed by a combination of direction based word , followed by a "-" and then a digit.
@YodaEmbedding
YodaEmbedding / .clang-format
Last active May 7, 2024 11:53
.clang-format for Rust style (rustfmt)
AccessModifierOffset: -2
AlignAfterOpenBracket: BlockIndent # New in v14. For earlier clang-format versions, use AlwaysBreak instead.
AlignConsecutiveMacros: false
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlines: DontAlign
AlignOperands: false
AlignTrailingComments: false
AllowAllArgumentsOnNextLine: false
AllowAllConstructorInitializersOnNextLine: false
@lcarsos
lcarsos / restore_functionality.sh
Last active May 7, 2024 11:53
Repeatedly kill sentinelone so you can actually use the processor and ram on your mac
#!/usr/bin/env bash
# Usage: sudo ./restore_functionality.sh
#ps aux | grep sentinel | awk -F " +" '{print $2}' | xargs kill
while true; do
launchctl kill SIGKILL system/com.crowdstrike.falcond
launchctl kill SIGKILL system/com.crowdstrike.userdaemon
launchctl kill SIGKILL system/com.sentinelone.sentineld
launchctl kill SIGKILL system/com.sentinelone.sentineld-helper
@mohanpedala
mohanpedala / bash_strict_mode.md
Last active May 7, 2024 11:52
set -e, -u, -o, -x pipefail explanation
@Arian04
Arian04 / shell.nix
Last active May 7, 2024 11:51 — forked from Nadrieril/shell.nix
Building LineageOS on NixOS
# I used this shell.nix to build LineageOS 21.0 for redfin (Google Pixel 5)
#
# IMPORANT NOTE: I had to use a pure shell for my builds to work, i.e: `nix-shell --pure` rather than `nix-shell`
#
# The build instructions are here: https://wiki.lineageos.org/devices/redfin/build
#
# Warning (from forked gist, was added August 1st 2018):
# The hardened NixOS kernel disables 32 bit emulation, which made me run into multiple "Exec format error" errors.
# To fix, use the default kernel, or enable "IA32_EMULATION y" in the kernel config.
#
@devomman
devomman / office-activation.md
Created May 30, 2023 11:01
Office Activation Command by Omman

Office 2021

Method 1: Using my command line

Step 1.1: Open cmd program with administrator rights.

  • First, you need to open cmd in the admin mode, then run all commands below one by one.

Step 1.2: Get into the Office directory in cmd.

  • For x86 and x64
cd /d %ProgramFiles(x86)%\Microsoft Office\Office16
cd /d %ProgramFiles%\Microsoft Office\Office16