Skip to content

Instantly share code, notes, and snippets.

@TheShrike
TheShrike / gist:6111200
Last active October 15, 2018 16:54 — forked from lucasfais/gist:1207002
Sublime Text 3 - Useful Shortcuts (Windows)

Sublime Text 3 – Useful Shortcuts (Windows)

General

Ctrl+Alt+P switch project
Ctrl+P go to file
F12 go to definition
Ctrl+R go to methods
Ctrl+⇧R go to methods in project
Ctrl+G go to line
@TheShrike
TheShrike / gist:ea9bedba847796de9457
Created February 18, 2016 15:03
React performance test (Mithril comparison)
<html>
<head><script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.7/react.min.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/react/0.14.7/react-dom.min.js"></script></head>
<body>
<p>To run an execution time test on this page, run the profiler from your browser's developer tools and measure the running time of a page refresh. (Lower is better)</p>
<div id="container">
</div>
<script>
var items = [{name: "a"}, {name: "b"}, {name: "c"}, {name: "a"}, {name: "b"}, {name: "c"}, {name: "a"}, {name: "b"}, {name: "c"}, {name: "a"}, {name: "b"}, {name: "c"}, {name: "a"}, {name: "b"}, {name: "c"}, {name: "a"}, {name: "b"}, {name: "c"}, {name: "a"}, {name: "b"}, {name: "c"}, {name: "a"}, {name: "b"}, {name: "c"}, {name: "a"}, {name: "b"}, {name: "c"}, {name: "a"}, {name: "b"}, {name: "c"}, {name: "a"}, {name: "b"}, {name: "c"}, {name: "a"}, {name: "b"}, {name: "c"}, {name: "a"}, {name: "b"}, {name: "c"}, {name: "a"}, {name: "b"}, {name: "c"}, {name: "a"}, {name: "b"}, {name: "c"},
@TheShrike
TheShrike / gist:ab1dff5446a560165073
Last active February 18, 2016 14:58
Php keep CPU load low in heavy script
function sleep_check_load($sleep, $load)
{
$done = FALSE;
while ($done == FALSE) {
sleep($sleep);
$load_avg = sys_getloadavg();