Skip to content

Instantly share code, notes, and snippets.

View torstenfeld's full-sized avatar

Torsten Feld torstenfeld

View GitHub Profile
Func _UpdateCheck(ByRef $lResultArray, $lNoUpdateMessage) ; checks for new versions of tool and ini files
Local $lTempArray, $lVar, $Var2, $lForceUpdate, $lIndex
Local $lUpdateItemsArray
Local $lCaseToCheckFor = "tool"
Local $lInetReadResult = InetRead($gUpdateInformation, 7)
If @error Then
_WriteDebug('ERR ;_UpdateCheck;Could not read "' & $gUpdateInformation & '"')
Return SetError(1, 0, 0)
@torstenfeld
torstenfeld / _sql.au3
Created October 8, 2012 09:21
AutoIT connect to MsSQL Server
#include-once
; #INDEX# ========================================================================
; Title .........: _SQL.au3
; AutoIt Version : 3.2
; Language ......: English
; Description ...: Some SQL stuff to use with an MSDE database
; Author ........: Chris Lambert
; ================================================================================
; #VARIABLES# ====================================================================
@torstenfeld
torstenfeld / post-form-output.js
Created November 29, 2012 10:59
Output of post parameters with javascript
<script>
$('form').submit(function() { // on submitting the form
alert($(this).serialize()); // alert the parameter string which would be sent
return false; // return false to stop the submit
});
</script>
/*
|--------------------------------------------------------------------------
| Base Site URL
|--------------------------------------------------------------------------
|
| URL to your CodeIgniter root. Typically this will be your base URL,
| WITH a trailing slash:
|
| http://example.com/
|

Deploy your site with git

This gist assumes:

  • you have a local git repo
  • with an online remote repository (github / bitbucket etc)
  • and a cloud server (Rackspace cloud / Amazon EC2 etc)
    • your (PHP) scripts are served from /var/www/html/
    • your webpages are executed by apache
  • apache's home directory is /var/www/
@torstenfeld
torstenfeld / gist:6205523
Created August 11, 2013 16:13
Handlebars.js if-condition helper
Handlebars.registerHelper('ifCond', function(v1, operator, v2, options) {
switch (operator) {
case '==':
return (v1 == v2) ? options.fn(this) : options.inverse(this);
break;
case '!=':
return (v1 != v2) ? options.fn(this) : options.inverse(this);
break;
case '===':
return (v1 === v2) ? options.fn(this) : options.inverse(this);
@torstenfeld
torstenfeld / gist:8368250
Created January 11, 2014 07:53
socket.io + express
var http = require('http');
var express = require('express');
var app = express();
app.use(express.bodyParser());
var server = http.createServer(app);
var io = require('socket.io').listen(server, {});
io.configure(function() {
io.set('log level', 2);