Skip to content

Instantly share code, notes, and snippets.

@gengwg
gengwg / test
Created August 19, 2014 21:36
test
asdf asdf asdf sadf sfsdfs
@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 / 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
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 / 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

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 / 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

gengwg@example:~/nc$ systemctl status bluetooth
● bluetooth.service - Bluetooth service
Loaded: loaded (/usr/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2019-11-23 16:52:45 PST; 6min ago
Docs: man:bluetoothd(8)
Main PID: 20081 (bluetoothd)
Status: "Running"
Tasks: 1
CGroup: /system.slice/bluetooth.service
└─20081 /usr/libexec/bluetooth/bluetoothd
@gengwg
gengwg / ergo.md
Last active April 18, 2020 00:22
  • wear braces only at night while asleep

    • helps straighten wrist
  • leaning foward puts too much pressure on wrist.

  • put monitor closer or make font larger so that no learn forward

  • pad on left; vertical mouse on right. use pad for scrolling, two finger; use mouse for more precision pointing.

  • move arms instead of wrist sometimes so that not only wrist stresses.

  • took pictures of all NICSN of PDUs in SFO102 (1/6)
  • took pictures of all NICMAC of PDUs in SFO102 (1/6)
  • Check temp sensors in SFO 102; took pictures: T59220452
  • request accesses to both building and server room in SFO102
  • T59413410 - CG Infra Incident - Two dgx1 nodes are reporting only 7 GPUs via nvidia-smi, not 8 as expected.
    • Saw errors on the two DGXs:
  • @mentions, #refs, links, formatting, and tags supported