Skip to content

Instantly share code, notes, and snippets.

View tsilvs's full-sized avatar
🏠
Working from home

Vsevolod Tsiliurik tsilvs

🏠
Working from home
View GitHub Profile
@woutervanwijk
woutervanwijk / android_autoconnect.sh
Last active April 5, 2025 21:29
auto connect to Android wireless debugging port and save it for the next time (for MacOS)
#!/bin/bash -x
# ip (static) for Android
# ANDROID_DEVICE=192.168.1.45
# ANDROID_DEVICE=192.168.1.85
FILE=~/.adb_port
ANDROID_DEVICE=192.168.1.45
#first test old port
PORT=$(cat "$FILE")
@cy6erGn0m
cy6erGn0m / Main.kt
Last active December 26, 2024 17:41
kotlin-native-libssh
import kotlinx.cinterop.*
import org.ssh.*
fun main(): Unit = memScoped {
val session = ssh_new() ?: return
val port = alloc<IntVar>()
port.value = 22
val verbosity = alloc<UIntVar>()
verbosity.value = SSH_LOG_PROTOCOL
@plembo
plembo / embed-crypt-rclone.md
Last active April 25, 2025 17:05
Embedding an encrypted folder with rclone

Embedding an encypted folder with rclone

There are many use cases for rclone. Mine was to "sync" with my "free" 15 GB Google Drive on Linux. While most of my files aren't particularly sensitive, there are a number that are. Until recently, I encrypted these manually using 7-zip. The problem with that was having to decrypt manually every time I wanted to look at them.

The Problem

Rclone has an encryption overlay that can be used to encrypt either a single folder or all folders in a configured remote (a networked storage system like Google Drive, OneDrive, AWS S3 or GCS). Setting it up is pretty easy, but an unintended consequence not discussed in any of the many tutorials on rclone encryption is that if your encrypted folder is a folder on an already existing remote (which is my preferred setup), using sync on the whole remote will remove the unencrypted files in the local copy of the folder and replace them with encrypted files.

The Solution

The solution to this conundrum isn't

@pierrejoubert73
pierrejoubert73 / markdown-details-collapsible.md
Last active April 29, 2025 14:07
How to add a collapsible section in markdown.

How to add a collapsible section in markdown

1. Example

Click me

Heading

  1. Foo
  2. Bar
    • Baz
  • Qux
@joyrexus
joyrexus / README.md
Last active December 30, 2024 01:37
collapsible markdown

collapsible markdown?

CLICK ME

yes, even hidden code blocks!

print("hello world!")
@xvitaly
xvitaly / remove_crw.cmd
Last active January 14, 2025 04:48
Remove telemetry updates for Windows 7 and 8.1
@echo off
echo Uninstalling KB3075249 (telemetry for Win7/8.1)
start /w wusa.exe /uninstall /kb:3075249 /quiet /norestart
echo Uninstalling KB3080149 (telemetry for Win7/8.1)
start /w wusa.exe /uninstall /kb:3080149 /quiet /norestart
echo Uninstalling KB3021917 (telemetry for Win7)
start /w wusa.exe /uninstall /kb:3021917 /quiet /norestart
echo Uninstalling KB3022345 (telemetry)
start /w wusa.exe /uninstall /kb:3022345 /quiet /norestart
echo Uninstalling KB3068708 (telemetry)
@jo
jo / js-crypto-libraries.md
Last active January 16, 2025 12:08
List of JavaScript Crypto libraries.

JavaScript Crypto Libraries

List some crypto libraries for JavaScript out there. Might be a bit out dated. Scroll to the bottom.

WebCryptoAPI

http://www.w3.org/TR/WebCryptoAPI/

This specification describes a JavaScript API for performing basic cryptographic operations in web applications, such as hashing, signature generation and verification, and encryption and decryption. Additionally, it describes an API for applications to generate and/or manage the keying material necessary to perform these operations. Uses for this API range from user or service authentication, document or code signing, and the confidentiality and integrity of communications.

@matthewmccullough
matthewmccullough / game-theory-books.markdown
Created May 17, 2012 22:10
Game Theory Book list by Matthew McCullough

Economics & Software Development - Book List

The following books are ordered in descending order of Matthew's preference.

by Avinash K. Dixit

Recommended by Ted Neward. A different perspective and writing style from the other volumes listed.

“I am hard pressed to think of another book that can match the combination of practical insights and reading enjoyment.”—Steven Levitt

@femto113
femto113 / transpose.js
Last active September 6, 2023 00:28
one line transpose for 2-dimensional Javascript arrays
function transpose(a)
{
return a[0].map(function (_, c) { return a.map(function (r) { return r[c]; }); });
// or in more modern dialect
// return a[0].map((_, c) => a.map(r => r[c]));
}