Skip to content

Instantly share code, notes, and snippets.

@metavige
metavige / hosts.ps1
Last active May 6, 2020 23:43 — forked from markembling/hosts.ps1
hosts.ps1
#
# Powershell script for adding/removing/showing entries to the hosts file.
#
# Known limitations:
# - does not handle entries with comments afterwards ("<ip> <host> # comment")
#
$file = "C:\Windows\System32\drivers\etc\hosts"
function add-host([string]$filename, [string]$ip, [string]$hostname) {
@metavige
metavige / 0_reuse_code.js
Created October 4, 2013 08:54
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@metavige
metavige / sublimetext2.html
Created May 10, 2012 19:26 — forked from lucifr/sublimetext2.html
Sublime Text 2 Shortcuts for Cheaters
<table>
<caption>打开/前往</caption>
<colgroup>
<col style="text-align:left;width:150px"/>
<col style="text-align:left;"/>
</colgroup>
<thead>
<tr>
<th scope="col">快捷键</th>
<th scope="col">说明</th>