Skip to content

Instantly share code, notes, and snippets.

@jubalm
jubalm / windows-edit-hosts-file.md
Last active April 25, 2025 13:07
Quickly edit Windows hosts file

Quickly edit Windows hosts file

NOTE: Needs administrative privilege. Editing the hosts file can mess up connectivity, edit with caution

  • Right click on your Desktop (can be any folder you choose)

  • Select New > Shortcut and drop the snippet below to the next prompt.

     "C:\Program Files (x86)\Sublime Text 3\sublime_text.exe" "C:\WINDOWS\System32\drivers\etc\hosts"
    
@adunning
adunning / epub.css
Created August 12, 2014 02:51
Better default epub.css for Pandoc (tested with iBooks)
/* This defines styles and classes used in the book */
body { margin: 0; text-align: justify; font-size: medium; font-family: Athelas, Georgia, serif; }
code { font-family: monospace; }
h1 { text-align: left; }
h2 { text-align: left; }
h3 { text-align: left; }
h4 { text-align: left; }
h5 { text-align: left; }
h6 { text-align: left; }
h1.title { }
/**
* Retrieves all the rows in the active spreadsheet that contain data and logs the
* values for each row.
* For more information on using the Spreadsheet API, see
* https://developers.google.com/apps-script/service_spreadsheet
*/
function readRows() {
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
@rollxx
rollxx / gist:2689219
Created May 13, 2012 16:40
iStat trial reset
rm ~/Library/Preferences/com.bjango.istatmenus.plist