Skip to content

Instantly share code, notes, and snippets.

@complex857
complex857 / gist:879407
Created March 21, 2011 12:54
win32 crtmpserver r395
Index: builders/VS2010/rtmpserver/rtmpserver.vcxproj
===================================================================
--- builders/VS2010/rtmpserver/rtmpserver.vcxproj (revision 395)
+++ builders/VS2010/rtmpserver/rtmpserver.vcxproj (working copy)
@@ -14,6 +14,7 @@
<ProjectGuid>{263CEFE6-3D6C-4F9F-9FE0-DA8A9A2FA996}</ProjectGuid>
<RootNamespace>rtmpserver</RootNamespace>
<Keyword>Win32Proj</Keyword>
+ <ProjectName>crtmpserver</ProjectName>
</PropertyGroup>
@complex857
complex857 / gist:888178
Created March 26, 2011 10:04
dcl sqrt for vms \o/
$ if P1 .eqs. "MAIL"
$ then
$ mail 'f$env("procedure")' MAULIS /subject="VMS BEADANDO 3"
$ goto legvege
$ endif
$ base = p1 * 1000000
$ last = 0
$ cur = 999 !gyok1hez
$ mul_loop:
$ cur = cur+1
@complex857
complex857 / addWithTermination.js
Created October 5, 2011 05:41
-val, -vel rag generálása szóhoz
function addWithTermination(word) {
var vowels = [
'a', 'á',
'e', 'é',
'i', 'í',
'o', 'ó',
'ö', 'ő',
'u', 'ú',
'ü', 'ű'
@complex857
complex857 / dbextract.sh
Created February 29, 2012 21:14
extract specific db from mysqldump output
#!/bin/bash
# copypasted from the internet, added foreign key check disable/enable
line=`grep -m 1 -n "Current Database: .$2" $1 | cut -d ":" -f 1`
next=`sed 1,${line}d $1|grep -m 1 -n "Current Database" | cut -d ":" -f 1`
end=$(($line + $next -1))
echo set foreign_key_checks = 0';'
sed -n ${line},${end}p $1
echo set foreign_key_checks = 1';'
@complex857
complex857 / calendizer.php
Created October 29, 2012 09:24
calendizer
<?php
define('OUTDIR', dirname(__FILE__).'/out/');
define('IN_CSV', dirname(__FILE__).'/magyar_naptar_2013_indd_utf8.txt');
header('Content-Type:text/html; charset=utf-8');
$layouts = array(
-1 => 'plain',
/*
* +--+--+
<?php
class MY_Controller extends CI_Controller {
public function __construct() {
parent::__construct();
require_once APPPATH. '/libraries/MtHaml/Autoloader.php'; // or whereever you put that file
\MtHaml\Autoloader::register();
$this->haml = new MtHaml\Environment('twig');
}
@complex857
complex857 / Instructions.md
Last active December 16, 2015 18:18
Please try out phpcomplete.vim with these test files.
  1. Save the gist files to a directory

  2. Open vim from that directory

  3. :echo tagfiles() should print ['tags'], so we can confirm tags found, the file was generated with ctags -R .

  4. Open test.php with :e test.php

  5. Hit <c-x><c-o> at the marked place (at the end of line 4)

  6. In the completion popup you should see:

     findme    ( f $a, $b = 'foo'
     findme_too( f $a, $b = 'foo'
    
@complex857
complex857 / 0000-PHP-parser-rewrite-full-string-parameters.patch
Created June 2, 2013 09:55
The new tokenizer based patch for ctags http://sourceforge.net/p/ctags/patches/83/ with full string parameters instead of '...' in the signature fields.
Index: Test/bug681824.php
===================================================================
--- Test/bug681824.php (revision 804)
+++ Test/bug681824.php (working copy)
@@ -1,3 +1,4 @@
+<?php
// Bugs item #681824, was opened at 2003-02-06 18:14
// You can respond by visiting:
// https://sourceforge.net/tracker/?func=detail&atid=106556&aid=681824&group_id=6556
Index: Test/simple.php
" Vim completion script
" Language: PHP
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" Maintainer: Shawn Biddle ( shawn AT shawnbiddle DOT com )
"
" OPTIONS:
"
" let g:phpcomplete_relax_static_constraint = 1/0 [default 0]
" Enables completion for non-static methods when completing for static context (::).
" This generates E_STRICT level warning, but php calls these methods nontheless.
@complex857
complex857 / phpcomplete.vim
Created January 15, 2014 20:26
One file phpcomplete.vim bundle
This file has been truncated, but you can view the full file.
" Vim completion script
" Language: PHP
" Maintainer: Mikolaj Machowski ( mikmach AT wp DOT pl )
" Maintainer: Shawn Biddle ( shawn AT shawnbiddle DOT com )
" Maintainer: Szabó Dávid ( complex857 AT gmail DOT com )
"
" OPTIONS:
"
" let g:phpcomplete_relax_static_constraint = 1/0 [default 0]
" Enables completion for non-static methods when completing for static context (::).