Skip to content

Instantly share code, notes, and snippets.

@uzxmx
uzxmx / download-old-chrome-versions.md
Created July 23, 2023 06:04 — forked from barbietunnie/download-old-chrome-versions.md
How to download old versions of Chrome

How to download old versions of Chrome

Click here to download old versions of Chrome for Linux, Mac and Windows.

The download_url field of the desired section houses the URL to the download.

Alternatively, for not too old versions, you can get it directly here.

@uzxmx
uzxmx / chained_http_proxy_server.go
Created March 5, 2022 02:38
Forward http(s) requests from one http(s) proxy to another http(s) proxy. Both http and https are supported.
package main
import (
"bufio"
"crypto/tls"
"encoding/base64"
"errors"
"github.com/elazarl/goproxy"
"io"
"io/ioutil"
@uzxmx
uzxmx / upgrade-es-6.x-to-6.8.md
Created February 25, 2020 08:47
Upgrade Elasticsearch from 6.x to 6.8

Disable shard allocation

curl -X PUT "localhost:9200/_cluster/settings?pretty" -H 'Content-Type: application/json' -d'
{
  "persistent": {
    "cluster.routing.allocation.enable": "primaries"
  }
}
'
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1beta1
metadata:
name: flannel
rules:
- apiGroups:
- ""
resources:
- pods
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->

Find tcp port of programs (network, tcp, listen)

lsof -i -n -P | grep TCP

@uzxmx
uzxmx / misc.md
Last active April 3, 2018 16:41
misc

SSH Tunnel

https://ngrok.com

git use http/https proxy

git config --global http.proxy 'socks5://127.0.0.1:1080' git config --global https.proxy 'socks5://127.0.0.1:1080'

how to ssh login without password

copy id_rsa.pub's content to ~/.ssh/authorized_keys

@uzxmx
uzxmx / enable_nativebridge
Created January 28, 2018 08:55
android x86 /system/bin/enable_nativebridge
#!/system/bin/sh
PATH=/system/bin:/system/xbin
houdini_bin=0
dest_dir=/system/lib$1/arm$1
binfmt_misc_dir=/proc/sys/fs/binfmt_misc
if [ -z "$1" ]; then
if [ "`uname -m`" = "x86_64" ]; then