This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Read-HtmlPage { | |
param ([Parameter(Mandatory=$true, Position=0, ValueFromPipeline=$true)][String] $Uri) | |
# Invoke-WebRequest and Invoke-RestMethod can't work properly with UTF-8 Response so we need to do things this way. | |
[Net.HttpWebRequest]$WebRequest = [Net.WebRequest]::Create($Uri) | |
[Net.HttpWebResponse]$WebResponse = $WebRequest.GetResponse() | |
$Reader = New-Object IO.StreamReader($WebResponse.GetResponseStream()) | |
$Response = $Reader.ReadToEnd() | |
$Reader.Close() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var jQuery, $ = null; | |
function addJQuery(callback) { | |
var p = null; | |
if(window.opera || window.navigator.vendor.match(/Google/)) { | |
var div = document.createElement("div"); | |
div.setAttribute("onclick", "return window;"); | |
p = div.onclick(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ "keys": ["shift+enter"], "command": "run_macro_file", "args": {"file": "Packages/Default/Add Line.sublime-macro"} }, | |
{ "keys": ["alt+up"], "command": "swap_line_up" }, | |
{ "keys": ["alt+down"], "command": "swap_line_down" }, | |
{ "keys": ["ctrl+alt+j"], "command": "join_lines" }, | |
{ "keys": ["ctrl+alt+down"], "command": "duplicate_line" }, | |
{ "keys": ["shift+ctrl+r"], "command": "show_overlay", "args": {"overlay": "goto", "show_files": true} }, | |
{ "keys": ["ctrl+shift+s"], "command": "save_all" }, | |
{ "keys": ["ctrl+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} }, | |
{ "keys": ["shift+ctrl+f4"], "command": "close_all" }, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* AngularJS example directive. | |
* Allows you to modify the page DOM and CSS styles before printing by exexuting the passed expression. | |
* Will force a $digest phase before the print operation. | |
* | |
* Example: <div ng-class="{printed: isPrinted}" on-before-print="printed = true" /> | |
*/ | |
module.directive('onBeforePrint', ['$window', '$rootScope', '$timeout', function onBeforePrint($window, $rootScope, $timeout) { | |
var beforePrintDirty = false; | |
var listeners = []; |
NewerOlder