Skip to content

Instantly share code, notes, and snippets.

View simonwongwong's full-sized avatar
🚲

Simon Wong simonwongwong

🚲
View GitHub Profile
@simonwongwong
simonwongwong / clicker.py
Last active December 25, 2021 02:59
clicker
import time
import pyautogui
import random
for i in range(3):
print(f"countdown: {3-i}")
time.sleep(1)
dist = 30
for _ in range(100000):
@simonwongwong
simonwongwong / ecelinux.md
Last active September 30, 2021 16:04 — forked from jzxhuang/ecelinux.md
ECE Linux SSH + VS Code Configuration (Windows and macOS)

ECE Linux SSH + VS Code Setup Guide

How to set up SSH for ECE linux "the right way". No VPN is required to SSH into ECE linux. Notably, with this setup:

  • Skip eceterm completely and go directly to eceubuntu/ecetesla - you only need to type the SSH command ONCE (and enter your password ONCE).
  • Configure VS Code to work over SSH. Edit remote files while maintaining your VS Code features like Intellisense, syntax highlighting, themes, etc.

Skip to the bottom of the document for a summary (TL;DR).

Configure SSH Locally (Skip eceterm and VPN)

@simonwongwong
simonwongwong / keybindings.json
Created May 17, 2021 19:29
change ctrl+tab behaviour in VSCODE to expected next/previous behaviour (like on chrome)
// Place your key bindings in this file to override the defaultsauto[]
[
{
"key": "ctrl+tab",
"command": "workbench.action.nextEditor"
},
{
"key": "ctrl+shift+tab",
"command": "workbench.action.previousEditor"
},
@simonwongwong
simonwongwong / notebook.json
Created August 9, 2019 13:56
Jupyter Notebook shortcuts. Drop file in ~/.jupyter/nbconfig
{
"keys": {
"command": {
"bind": {
"r, r": "jupyter-notebook:restart-kernel-and-run-all-cells",
"d,c": "jupyter-notebook:clear-cell-output",
"d,r": "jupyter-notebook:restart-kernel-and-run-all-cells",
"d,l": "jupyter-notebook:run-all-cells",
"d,t": "jupyter-notebook:restart-kernel",
"d,m,u": "jupyter-notebook:move-cell-up",
@simonwongwong
simonwongwong / table2rst.py
Last active July 8, 2019 14:45 — forked from marianoguerra/table2rst.py
Create an RST table from a CSV (Python 3.1+)
'''read a csv file representing a table and write a restructured text simple
table'''
import sys
import csv
import io
def get_out(out=None):
'''
return a file like object from different kinds of values
None: returns stdout