Skip to content

Instantly share code, notes, and snippets.

View sstoner's full-sized avatar
🎯
Focusing

SStoner sstoner

🎯
Focusing
View GitHub Profile
// Place your key bindings in this file to override the defaults
/* VSCode keybindings for alternative HJLK navigation, when using non-vim mode
* and support for quick panel navigation with Tab/Shift+Tab.
*
* So basically I just tried to use everywhere in the editor these aliases:
* Alt+j = down
* Alt+k = up
* Alt+l = right
* Alt+h = left
* Alt+b = previous-word
7741 execve("/usr/bin/python", ["python", "/get_addr_info.py", "chongqing.nginx.dcos", "3"], [/* 20 vars */]) = 0
7741 brk(0) = 0x19f1000
7741 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f92856f1000
7741 access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
7741 open("/etc/ld.so.cache", O_RDONLY) = 3
7741 fstat(3, {st_mode=S_IFREG|0644, st_size=58960, ...}) = 0
7741 mmap(NULL, 58960, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f92856e2000
7741 close(3) = 0
7741 open("/usr/lib64/libpython2.6.so.1.0", O_RDONLY) = 3
7741 read(3, "\177ELF\2\1\1\0\0\0\0\0\0\0\0\0\3\0>\0\1\0\0\0\200\306\3\0\0\0\0\0"..., 832) = 832
@sstoner
sstoner / gist:0aaf7350b3adb0bde160e5be5a314612
Created April 23, 2017 19:17
基于RESTful风格的flask应用设计
from flask import Flask,jsonify,request,abort,Response
from time import ctime
from uuid import uuid4
import json
app = Flask(__name__)
from flask_login import LoginManager
from flask_login import login_required
@sstoner
sstoner / Installation.md
Created January 19, 2017 03:14 — forked from albertbori/Installation.md
Automatically disable Wifi when an Ethernet connection (cable) is plugged in on a Mac

Overview

This is a bash script that will automatically turn your wifi off if you connect your computer to an ethernet connection and turn wifi back on when you unplug your ethernet cable/adapter. If you decide to turn wifi on for whatever reason, it will remember that choice. This was improvised from this mac hint to work with Yosemite, and without hard-coding the adapter names. It's supposed to support growl, but I didn't check that part. I did, however, add OSX notification center support. Feel free to fork and fix any issues you encounter.

Most the credit for these changes go to Dave Holland.

Requirements

  • Mac OSX 10+
  • Administrator privileges