Skip to content

Instantly share code, notes, and snippets.

@vonHabsi
vonHabsi / TST : Freeswitch
Created January 19, 2015 00:57
TST : Freeswitch
TST : Freeswitch
@vonHabsi
vonHabsi / TST : Tech Bloggers
Created January 21, 2015 17:51
TST : Tech Bloggers
TST : Tech Bloggers
@vonHabsi
vonHabsi / TST : KDE
Created January 22, 2015 03:19
TST : KDE
TST : KDE
@vonHabsi
vonHabsi / uniqueDirs.dpr
Created February 4, 2015 03:00
unique directories at some depth
program uniqueDirs;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Classes, SysUtils, CustApp
{ you can add units after this }
@vonHabsi
vonHabsi / phpcondition_01
Last active August 29, 2015 14:15
Drupal Gists - Block Visibility
<?php
// http://drupal.stackexchange.com/questions/18442/display-a-view-block-for-everyone-except-one-role
global $user;
if (in_array('ROLETHATSHOULDNOTSEETHISBLOCK',array_values($user->roles))) {
return FALSE;
} else {
return TRUE;
}
@vonHabsi
vonHabsi / git_tips01.md
Last active August 29, 2015 14:17
Git Tips

###git log command for parsing svn originated repos for matching svn revisions to git commits, from How do I show the SVN revision number in git log?

git log -z | tr '\n\0' ' \n' | sed 's/\(commit \S*\) .*git-svn-id: svn:[^@]*@\([0-9]*\) .*/\1 r\2/'
@vonHabsi
vonHabsi / Lazarus Links.md
Last active August 29, 2015 14:17
Lazarus Links
@vonHabsi
vonHabsi / fpcjs example.md
Last active August 29, 2015 14:17
Work in Progress Repo Text Files

Unlike original/official Delphi JavaScript bridge, which is due to its complexness not compileable in FPC (FreePascal) and/or doesn't work really well, is too big, bloated and outdated, this project use only js15decl.pas (basically C header) interface from the original bridge and add very small (simple and maintainable) wrapper around it to simplify the usage of Mozilla JavaScript engine in FPC. It also contain set of minimal working demos how to do basic JS stuff from FPC like call JS function, set JS variable, call FPC function from JS, etc... Please use SVN to download the project.

API Overview

If you want to use FpcJs, you need add uses clause first.

uses FpcJs;