Skip to content

Instantly share code, notes, and snippets.

@hamsterbacke23
hamsterbacke23 / npm.sublime-build
Created February 26, 2014 15:20
sublime build
{
"cmd": ["grunt", "version"],
"shell" : "true",
"variants": [
{ "cmd": ["grunt", "build"],
"name": "Concrete5 package: Get rid of grunt and cli stuff",
"shell": true
},
@hamsterbacke23
hamsterbacke23 / gist:9682999
Created March 21, 2014 10:00
sublime klickmodell to concrete5 areas regex
// strg - h
(.*)echo(?:\s.*)isset\(\$areas\['(.*)'\]\).+
$1$a = new Area('$2');\n$1$a->display($c);
@hamsterbacke23
hamsterbacke23 / html bootstrap
Created April 30, 2014 07:37
html bootstrap
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Bootstrap 101 Template</title>
@hamsterbacke23
hamsterbacke23 / grunt-regex-links
Created June 30, 2014 08:07
grunt regex replace intern links
@hamsterbacke23
hamsterbacke23 / mysqlversion
Created August 14, 2014 15:08
check mysql server version
<?php
$link = mysql_connect("host", "db", "pw");
if (!$link) die('Could not connect: ' . mysql_error());
$sql = 'SHOW VARIABLES LIKE "%version%"';
$result = mysql_query($sql,$link);
print "MySQL server version: " . mysql_get_server_info();
while($row = mysql_fetch_assoc($result)){
foreach($row as $cname => $cvalue){
print "$cname: $cvalue\t";
}
@hamsterbacke23
hamsterbacke23 / c5_getvars.bat
Last active August 29, 2015 14:06
gettext search all files windows
:: usage: c5_getvars.bat", "<searchpath>", "<messages.po-path>", "<file-extension to search>"
SETLOCAL ENABLEDELAYEDEXPANSION :: I wonder what this does ?
:: set extension
SET Extension=%3
SET Extension
CALL :LoCase Extension
SET Extension
@hamsterbacke23
hamsterbacke23 / killtasks
Created September 11, 2014 11:24
kill mulitple windows tasks at once
taskkill /F /IM <processname.exe> /T
@hamsterbacke23
hamsterbacke23 / error_report_level
Created September 24, 2014 10:20
Display current error report level
<?php
function error_level_tostring($intval, $separator)
{
$errorlevels = array(
E_ALL => 'E_ALL',
E_USER_DEPRECATED => 'E_USER_DEPRECATED',
E_DEPRECATED => 'E_DEPRECATED',
E_RECOVERABLE_ERROR => 'E_RECOVERABLE_ERROR',
E_STRICT => 'E_STRICT',
E_USER_NOTICE => 'E_USER_NOTICE',
@hamsterbacke23
hamsterbacke23 / st3comment
Last active August 29, 2015 14:12
st3 comment
<snippet>
<content><![CDATA[//${1/./-/g}--
// ${1:Your Comment Goes here}
//${1/./-/g}--]]></content>
<tabTrigger>comm</tabTrigger>
<scope>text.plain, source.js, source.sass, source.less, source.php</scope>
</snippet>
@hamsterbacke23
hamsterbacke23 / website_de.json
Created January 16, 2015 16:24
elasticsearch templates
{
"template" : "*_de",
"mappings" : {
"page": {
"dynamic": "strict",
"properties": {
"body": {
"type": "string",
"analyzer": "german"