Skip to content

Instantly share code, notes, and snippets.

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

Sergey Mokrushin s-mokrushin

🏠
Working from home
View GitHub Profile
@disaac
disaac / jopbuild.sh
Created April 12, 2023 16:46
Download and Build Joplin Desktop for MacOS arm64
#!/usr/bin/env bash
# Modified from https://github.com/laurent22/joplin/issues/6052#issuecomment-1356864011
# Tested on latest dev branch as of 20213-04-12
function initVars() {
REPO="${JOP_REPO:-"laurent22/joplin"}"
repoUrl="https://github.com/${REPO}.git"
srcBaseDir="joplin"
appDesktopPath="packages/app-desktop"
packageJsonPath="${appDesktopPath}/package.json"
dmgPath="node_modules/dmg-builder/out/dmg.js"
@dmcbane
dmcbane / README.md
Last active July 26, 2024 19:02
Setup Ubuntu for PIN login

Setup Ubuntu for PIN Login Instead of Long Password

  • Install packages if they aren't already installed.
sudo apt install libpam-pwdfile whois
  • Backup the Original PAM Configuration File
@andrebrait
andrebrait / keychron_linux.md
Last active July 26, 2024 15:40
Keychron keyboards on Linux + Bluetooth fixes

Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.

Note: many newer Keychron keyboards use QMK as firmware and most tips here do not apply to them. Maybe the ones related to Bluetooth can be useful, but everything related to Apple's keyboard module (hid_apple) on Linux, won't work. As far as I know, all QMK-based boards use the hid_generic module instead. Examples of QMK-based boards are: Q, Q-Pro, V, K-Pro, etc.

Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.

Make Fn + F-keys work (NOT FOR QMK-BASED BOARDS)

Older Keychron keyboards (those not based on QMK) use the hid_apple driver on Linux, even in the Windows/Android mode, both in Bluetooth and Wired modes.

###> symfony/mailer ###
MAILER_DSN=smtp://YOUR@MAİL.com:PASSWORD@smtp.yandex.com:465?encryption=ssl&auth_mode=login
###< symfony/mailer ###
@markodvornik
markodvornik / Hack-WD-MCHD.md
Last active June 16, 2024 06:11
How to hack the "WD My Cloud Home Duo" into a decent home media center

WD My Cloud Home Duo Hack

🚩 NOTE: in late 2022 WD introduced a firmware release in which they locked root user access over "serial connection". The methods described in this post are therefore irrelevant and do not work anymore. Feel free to discus other alternatives in the comments below. This was also the final firmware release for this product as it entered EOL in June 2023.

TL;DR

A simple How-To on turnning your WD My Cloud Home in to fully pledged Linux box and install some usefull apps (SSH & SFTP server, Torrent client, ...).

  • Connect to the device with USB serial cable.
@berndverst
berndverst / Readme.md
Last active March 29, 2024 09:27
Script to quickly merge captions into mp4 H.264 (or HEVC/H.265) video as selectable or burned in subtitles from command-line

Add captions to MP4 videos as subtitles

Requirements

FFMpeg must be installed.

Instructions:

@bergmannjg
bergmannjg / rearct-native-app-in-wsl2.md
Last active July 26, 2024 08:55
Building a react native app in WSL2
@niw
niw / Vagrantfile
Last active July 18, 2024 00:52
A simple Vagrantfile to setup Ubuntu desktop environment with Google Chrome and Japanese input
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/bionic64"
config.vm.provider :virtualbox do |v|
v.gui = true
v.memory = 2048
end
# Currently "ubuntu/bionic64" on VirtualBox requires `type: "virtualbox"`
# to make synced folder works.
@noelleleigh
noelleleigh / Upgrade-Npm.ps1
Last active February 8, 2019 21:10
Automate the process of upgrading npm from a Node.js installation managed by nvm-windows.
# Automate npm updating when using nvm-windows
# Installs npm@latest for the current active node install
# Source: https://github.com/coreybutler/nvm-windows/issues/300#issuecomment-368192283
$ErrorActionPreference = "Stop"
# Create a folder in the Temp directory and return it
# Source: https://stackoverflow.com/a/34559554/9165387
function New-TemporaryDirectory {
$parent = [System.IO.Path]::GetTempPath()
$name = [System.IO.Path]::GetRandomFileName()
@devinodaniel
devinodaniel / gist:8f9b8a4f31573f428f29ec0e884e6673
Created November 21, 2017 20:18
Generate SSH RSA Private/Public Key pair with Golang
// This shows an example of how to generate a SSH RSA Private/Public key pair and save it locally
package main
import (
"crypto/rand"
"crypto/rsa"
"crypto/x509"
"encoding/pem"
"golang.org/x/crypto/ssh"