Skip to content

Instantly share code, notes, and snippets.

View Bryant-Yang's full-sized avatar

Yang Bo Bryant-Yang

View GitHub Profile
#!/bin/bash
echo export TMOUT=1000000 >> /root/.bash_profile
cat /root/.bash_profile
source .bash_profile
cp /etc/ssh/sshd_config /etc/ssh/sshd_config_bak
echo ClientAliveInterval=60 >> /etc/ssh/sshd_config
service sshd restart
cat /etc/ssh/sshd_config
service sshd restart
exit
@Bryant-Yang
Bryant-Yang / app.py
Created September 19, 2017 16:56 — forked from saghul/app.py
WSGI + WebSocket + static files Twisted example
import os
from autobahn.resource import WebSocketResource, WSGIRootResource
from autobahn.websocket import WebSocketServerFactory, WebSocketServerProtocol
from flask import Flask, render_template
from twisted.application import internet, service
from twisted.internet import reactor
from twisted.python.threadpool import ThreadPool
from twisted.web.server import Site

Go Cheat Sheet

Credits

Most example code taken from A Tour of Go, which is an excellent introduction to Go. If you're new to Go, do that tour. Seriously.

Go in a Nutshell

  • Imperative language