Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
| Ctrl+C | copy current line (if no selection) |
| Ctrl+X | cut current line (if no selection) |
| Ctrl+⇧+K | delete line |
| Ctrl+↩ | insert line after |
| test -f ~/.profile && . ~/.profile | |
| test -f ~/.bashrc && . ~/.bashrc |
| <powershell> | |
| winrm quickconfig -q | |
| winrm set winrm/config/winrs '@{MaxMemoryPerShellMB="300"}' | |
| winrm set winrm/config '@{MaxTimeoutms="1800000"}' | |
| winrm set winrm/config/service '@{AllowUnencrypted="true"}' | |
| winrm set winrm/config/service/auth '@{Basic="true"}' | |
| netsh advfirewall firewall add rule name="WinRM 5985" protocol=TCP dir=in localport=5985 action=allow | |
| netsh advfirewall firewall add rule name="WinRM 5986" protocol=TCP dir=in localport=5986 action=allow |
| ECHO OFF | |
| cd /d %~dp0 | |
| for /f "tokens=2* delims= " %%F IN ('vagrant status ^| find /I "default"') DO (SET "STATE=%%F%%G") | |
| ECHO Close this window if it remains open, and http://localhost:8081 is responsive | |
| IF "%STATE%" NEQ "saved" ( | |
| ECHO Starting Vagrant VM from powered down state... | |
| vagrant up | |
| ) ELSE ( |
Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
| Ctrl+C | copy current line (if no selection) |
| Ctrl+X | cut current line (if no selection) |
| Ctrl+⇧+K | delete line |
| Ctrl+↩ | insert line after |
| #!/dh/cgi-system/php5.cgi -q | |
| <?php | |
| $TWITTER_USERNAME = 'foo'; | |
| $TWITTER_PASSWORD = 'bar'; | |
| $PDO_CONN_URL = 'mysql:host=hostname;dbname=db_name', 'username', 'password'; | |
| set_time_limit(0); | |
| function getLinkFromHref($str) { | |
| return htmlspecialchars(preg_replace('/(<a href=")([^"]+)"(.*)/i', '$2', $str), ENT_QUOTES, 'UTF-8'); |
| <?php | |
| /** | |
| * @author Anush Prem <goku.anush@gmail.com> | |
| * @package Solver | |
| * @subpackage Sudoku | |
| * @version 0.1 | |
| */ | |
| /** |
| public HttpContextBase FakeHttpContext() { | |
| var context = new Mock<HttpContextBase>(); | |
| var files = new Mock<HttpFileCollectionBase>(); | |
| var request = new Mock<HttpRequestBase>(); | |
| var response = new Mock<HttpResponseBase>(); | |
| var session = new Mock<HttpSessionStateBase>(); | |
| var server = new Mock<HttpServerUtilityBase>(); | |
| var user = new Mock<IPrincipal>(); | |
| var identity = new Mock<IIdentity>(); | |
| request.Setup(req => req.ApplicationPath).Returns("~/"); |
| #!/bin/sh | |
| # | |
| # init.d script with LSB support. | |
| # | |
| # Copyright (c) 2007 Javier Fernandez-Sanguino <jfs@debian.org> | |
| # | |
| # This is free software; you may redistribute it and/or modify | |
| # it under the terms of the GNU General Public License as | |
| # published by the Free Software Foundation; either version 2, | |
| # or (at your option) any later version. |