Skip to content

Instantly share code, notes, and snippets.

@gengwg
gengwg / install_mosh.md
Last active March 28, 2021 18:37
install mosh on raspberry pi

On Server

sudo apt install mosh
sudo ufw allow from 192.168.1.0/24 to any port 60000:61000 proto udp

On Client

Just got my laptop today. It is AMAZING. totally exceeds my expectation for sub-200 dollar. I was a little worried because it's so cheap, but now never regret.

  • build quality. it's metal all over. really sleek. feels good. much better than my 600 lenovo plastic one.

  • type-C charging.

  • HDMI

  • 1080p display is great. Not IPS but good enough for watching youtube. Hint: turn the scale to 125%. otherwise font seems too small for me. I may give it to parent. if so I will change it to 150%.

  • micro sd card reader is awesome! I don't have to find an adapter all the time. And can extend the storage to 512 GB if I want. (Just wait for a micro sd card deal!)

@gengwg
gengwg / github_private_email.md
Created October 10, 2019 03:44
remote: error: GH007: Your push would publish a private email address.
Enumerating objects: 3, done.
Counting objects: 100% (3/3), done.
Delta compression using up to 4 threads
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 681 bytes | 681.00 KiB/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: error: GH007: Your push would publish a private email address.
remote: You can make your email public or disable this protection by visiting:
remote: http://github.com/settings/emails
HTTP/1.1 200 OK
Content-Length: 3900
Content-Type: application/json; charset=UTF-8
{
"email_savingscatcher_v2": {
"mappings": {
"_default_": {
"_timestamp": {
"enabled": true
@gengwg
gengwg / install_spark_centos7.sh
Created April 17, 2017 18:23 — forked from darcyliu/install_spark_centos7.sh
Install Spark on CentOS 7
#!/bin/bash
# Install Spark on CentOS 7
yum install java -y
java -version
yum install wget -y
wget http://downloads.typesafe.com/scala/2.11.7/scala-2.11.7.tgz
tar xvf scala-2.11.7.tgz
sudo mv scala-2.11.7 /usr/lib
sudo ln -s /usr/lib/scala-2.11.7 /usr/lib/scala
@gengwg
gengwg / connect_cisco.py
Last active August 9, 2016 22:12
Connect to Cisco ASA
```python
#!/usr/bin/env python
from netmiko import ConnectHandler
from getpass import getpass
ip_address = raw_input("Enter IP address: ")
username = raw_input("Enter username: ")
device = {
@gengwg
gengwg / test
Created August 19, 2014 21:36
test
asdf asdf asdf sadf sfsdfs