Skip to content

Instantly share code, notes, and snippets.

@parkerlreed
parkerlreed / betteradbcopy
Last active June 13, 2024 17:00
betteradbcopy - Multi-threaded SCP to/from Android device over USB/WiFi with Termux
#!/bin/bash
# Make sure to have OpenSSH setup in Termux as well as setting a password with `passwd`
# Requires https://github.com/upa/mscp and adb platform tools on your local machine
init_sshd() {
adb shell -t "run-as com.termux files/usr/bin/bash -lic 'export PATH=/data/data/com.termux/files/usr/bin:$PATH; export LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so; sshd'"
adb forward tcp:8022 tcp:8022;
}
stop_sshd() {
adb shell -t "run-as com.termux files/usr/bin/bash -lic 'export PATH=/data/data/com.termux/files/usr/bin:$PATH; export LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so; killall sshd'"
@azet
azet / Datacenter-Operations__here_be_dragons.md
Last active January 30, 2024 18:25
Reading material for Operations & Datacenter engineers and managers

Check Out these projects, papers and blog posts if you're working on Geo redundant Datacenters or even if you only need to have your software hosted there. It's good to know what you're in for.

  Collected these for a colleague, these have been super useful over 
  the past 15+ years and and will most likely help and/or entertain you. 
  May be extended in the future.
  -- azet (@azet.org)

load balancing

DNS geo & anycast

@influx6
influx6 / restart-ssh.bash
Last active July 1, 2024 15:00
Restart SSH on Mac Terminal (High Sierra)
# high sierra
sudo launchctl stop com.openssh.sshd
sudo launchctl start com.openssh.sshd
# latest
sudo vim /etc/services # (update the port config for ssh and save)
sudo launchctl unload /System/Library/LaunchDaemons/ssh.plist
sudo launchctl load -w /System/Library/LaunchDaemons/ssh.plist
@gravitylow
gravitylow / codesign_gdb.md
Last active April 16, 2024 02:18 — forked from hlissner/codesign_gdb.md
Codesign gdb on macOS

If you are getting this in gdb on macOS while trying to run a program:

Unable to find Mach task port for process-id 57573: (os/kern) failure (0x5).
 (please check gdb is codesigned - see taskgated(8))
  1. Open Keychain Access
  2. In menu, open Keychain Access > Certificate Assistant > Create a certificate
  3. Give it a name (e.g. gdbc)

Huge Page まとめ

この文書では、Linux カーネルの機能を中心に、 huge page に関連するメモ リ管理の機能についてまとめる。概観とキーワードの把握、およびリファレン スの提供を目的である。特に non-trasparent な huge page と transparent huge page の違いとそれらの境界を把握することをひとつの主眼としている。 そのため、詳細さと網羅性はスコープ外である。

前置き、または免責

@amotoki
amotoki / local.conf
Created June 24, 2014 05:07
local.conf for devstack (master branch)
[[local|localrc]]
#OFFLINE=True
RECLONE=True
#disable_service mysql
#enable_service postgresql
#disable_service cinder c-sch c-api c-vol
#disable_service tempest
#disable_service horizon
# HG changeset patch
# Parent 092b770473a785abc4b9232a5e2c76c8ce497485
diff -r 092b770473a7 bake/ModuleBuild.py
--- a/bake/ModuleBuild.py Wed Sep 25 23:58:18 2013 +0900
+++ b/bake/ModuleBuild.py Thu Oct 10 09:13:32 2013 +0900
@@ -31,6 +31,7 @@
import commands
import re
import sys