Skip to content

Instantly share code, notes, and snippets.

@janasco
janasco / AnyDesk-Reset.cmd
Created August 3, 2023 09:46
AnyDesk Reset
@echo off & setlocal enableextensions
title Reset AnyDesk
reg query HKEY_USERS\S-1-5-19 >NUL || (echo Please Run as administrator.& pause >NUL&exit)
chcp 437
call :stop_any
del /f "%ALLUSERSPROFILE%\AnyDesk\service.conf"
del /f "%APPDATA%\AnyDesk\service.conf"
copy /y "%APPDATA%\AnyDesk\user.conf" "%temp%\"
rd /s /q "%temp%\thumbnails" 2>NUL
xcopy /c /e /h /r /y /i /k "%APPDATA%\AnyDesk\thumbnails" "%temp%\thumbnails"
@edjdavid
edjdavid / file.md
Created October 13, 2022 12:45
Stream Windows webcam/desktop via RTSP

Can be used for streaming data (webcam or screen capture) from the Windows to WSL

Install

  1. Simple RTSP Server
  2. ffmpeg

Get the internal IP of WSL

Run from a WSL terminal

ip route list default | awk '{print $3}'
@lsd
lsd / IdeaVim OS X Key Repeat.markdown
Last active May 3, 2024 07:22
Enable key-repeat for ALL applications or just for IdeaVim/specific JetBrains apps

Upgrading to Lion or Yosemite and WebStorm 9, I noticed key repeat was
turned off for the IdeaVim plugin h j k l keys.

System-wide key repeat

defaults write -g ApplePressAndHoldEnabled -bool false in a terminal will enable
key repeat for every app. This can alternatively be found in the accessibility settings in OS X' preferences.

App specific key repeat

@Hritik14
Hritik14 / 01-decrypt.js
Last active May 3, 2024 07:21
Encrypt aes 256 gcm in Java Springboot and decrypt in Nodejs
const {
pbkdf2Sync,
createDecipheriv,
} = require('crypto');
const algorithm = 'aes-256-gcm';
const password = 'ABCD';
const salt_hex = "FFFFFFFFFFFFFFFF"
const java_encrypted_base64 = "r8URnR8DLWFH1ipBoREtkwX6wi5x/japz85d+3e2BBWCrVs="
@kepano
kepano / obsidian-web-clipper.js
Last active May 3, 2024 07:21
Obsidian Web Clipper Bookmarklet to save articles and pages from the web (for Safari, Chrome, Firefox, and mobile browsers)
javascript: Promise.all([import('https://unpkg.com/turndown@6.0.0?module'), import('https://unpkg.com/@tehshrike/readability@0.2.0'), ]).then(async ([{
default: Turndown
}, {
default: Readability
}]) => {
/* Optional vault name */
const vault = "";
/* Optional folder name such as "Clippings/" */
@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
@brunolemos
brunolemos / Xcode Build Phases
Created November 22, 2017 08:23
React Native with Source Maps
# Xcode > Build Phases > Bundle React Native code and images
export NODE_BINARY=node
./react-native-xcode.sh
@lalithabacies
lalithabacies / api-key.txt
Created September 7, 2017 07:17
Open weather API key
BIT.LY link zu dieser Seite:
https://bit.ly/weather-api
API Key:
bd5e378503939ddaee76f12ad7a97608
API Doku:
http://openweathermap.org/current
How to use an API key:
@zhuziyi1989
zhuziyi1989 / URL Schemes.md
Last active May 3, 2024 07:12
常用 URL Schemes 收集。

** 由于此文年事已久,可能某些URL Schemes已失效,可在评论区留言指出!(最后更新于 2024.4.16)

关于 URL Scheme 你知道多少?

iOS系统中

由于苹果的各应用都是在沙盒中,不能够互相之间访问或共享数据。但是苹果还是给出了一个可以在APP之间跳转的方法:URL Scheme。简单的说,URL Scheme就是一个可以让 APP 相互之间可以跳转的协议。每个 APP 的URL Scheme都是不一样的,如果存在一样的URL Scheme,那么系统就会响应先安装那个 APP 的URL Scheme,因为后安装的 APP 的URL Scheme被覆盖掉了,是不能被调用的。

Android系统中

@janeczku
janeczku / rancher-argocd.md
Created June 10, 2020 14:10
How to register Rancher managed Kubernetes clusters in Argo CD

How to register Rancher managed Kubernetes clusters in Argo CD

Registering Rancher managed clusters in Argo CD doesn't work out of the box unless the Authorized Cluster Endpoint is used. Many users will prefer an integration of Argo CD via the central Rancher authentication proxy (which shares the network endpoint of the Rancher API/GUI). So let's find out why registering clusters via Rancher auth proxy fails and how to make it work.

Hint: If you are just looking for the solution scroll to the bottom of this page.

Why do i get an error when running argocd cluster add?

Service Account tokens and the Rancher authentication proxy