Skip to content

Instantly share code, notes, and snippets.

View sl5net's full-sized avatar
🏠
Working from home

sl5net

🏠
Working from home
View GitHub Profile
@sl5net
sl5net / SL5_preg_contentFinder.php
Last active December 25, 2015 19:39
a PHP Template Engine class using Perl Compatible Regular Expressions (PCRE) ### Update 25.10.2013: https://github.com/sl5net/SL5_preg_contentFinder ###
<?php
/*
This SL5_ContentFinder class is part of the doSqlWeb project,
a PHP Template Engine.
Copyright (C) 2013 Sebastian Lauffer, http://SL5.net
SL5_ContentFinder stands under the terms of the GNU General Public
License as published by the Free Software Foundation, either version 3
of the License, or (at your option) any later version.
@sl5net
sl5net / gist:7170280
Last active December 26, 2015 15:08
AutoHotkey-Script for navigate in PhpStorm 7.0
Switching beetween Editors and zooming text during presentations or so could be complicated.
If you used to do it like in notepad++ may this helps:
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#SingleInstance force
; written by sl5.net
#NoEnv
#SingleInstance off ; sonst kriegen wir (zumindest bei kurzen Skripten) die AHK-Meldung
/*
registriere Nachrichten
===========================
Wir könnten hier irgendwelche festen Zahlen verwenden, aber wenn wir Pech haben, führt das zu Konflikten mit anderen Programmen,
die dieselbe Zahl für was Anderes nutzen.
Also registrieren wir die Nachricht offiziell bei Windows und kriegen den Zahlenwert dafür geliefert.
*/
@sl5net
sl5net / gist:b64459d88bbcdeb04a97
Created May 8, 2015 15:13
Map AltGr+7 to Strg+Alt+7 ... Shortcuts for Jetbrains IDE
#IfWinActive,ahk_class SunAwtFrame
^>!7:: ; AltGr + 7
useCase:=1
if(useCase == 2)
{
; dont work
Suspend,on
Send,{Blind}
Send,{CtrlDown}!{{} ; works
;~ Send,{
; Example #1:
SysGet, MouseButtonCount, 43
SysGet, VirtualScreenWidth, 78
SysGet, VirtualScreenHeight, 79
; Example #2: This is a working script that displays info about each monitor:
SysGet, MonitorCount, MonitorCount
SysGet, MonitorPrimary, MonitorPrimary
monitorTXT := "Monit!or15-06-05_07-57.txt" ; dateinamen für die ausgabe der monitor daten
IfExist,%monitorTXT%
@sl5net
sl5net / gist:824ea1907aa29039ea39
Created June 5, 2015 08:01
sikuliX_multi_monitors_test15-06-05_09-59
n = getNumberScreens()
nNumverScreensExpected = 4
print (Env.getSikuliVersion() , " " , n , " monitors." )
for ScreenId in range(n):
print("----------------- ScreenId = ", ScreenId)
reg = Screen(ScreenId)
print("reg: x, y, w, h = ", reg.x , reg.y, reg.w, reg.h)
x = reg.x
y = reg.y
topLeft = Location(x, y) # equivalent to
@sl5net
sl5net / gist:760007cb0c50128f7cbd
Created June 5, 2015 14:31
KeyValue for System.out.println() in IntelliJ IDEA
SetTitleMatchMode,2
#IfWinActive,- IntelliJ IDEA 14.1.3 ahk_class SunAwtFrame
^%::
+%::
if(StrLen(clipboard) < 100 )
{
c := clipboard
c2 := "{NumpadAdd} "" = " . c . "\n"""
Loop, %A_ScriptDir%/*.*, 2 , 1
{
if(StrLen(A_LoopFileFullPath) < StrLen(A_ScriptDir))
{
; thats bullshit
continue
}
;~ ToolTip,A_LoopFileFullPath=%A_LoopFileFullPath%
msgBox_A_LoopFileF = A_LoopFileFullPath= %A_LoopFileFullPath% `n A_LoopFileFullPath=%A_LoopFileFullPath% `n A_LoopFileName=%A_LoopFileName% `n A_LoopFileDir=%A_LoopFileDir% `n A_ScriptDir=%A_ScriptDir% `n %A_AhkVersion% = A_ahkVersion (line:%A_LineNumber%) `n Tools: SciTE4AutoHotkey, SL5_AHK_Refactor_engine
Clipboard=%msgBox_A_LoopFileF%
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.0'
// NOTE: Do not place your application dependencies here; they belong
; Indentation_style: https://de.wikipedia.org/wiki/Einrückungsstil#SL5small-Stil
#Include *i %A_ScriptDir%\inc_ahk\init_global.init.inc.ahk
; text sugestion for your commit: this commits are fully automatic produced by script automatic-git-push-in-intellij.ahk
SetTitleMatchMode,2
feedbackMsgBoxCloseAllWindows()
;feedbackMsgBox(A_ScriptName,"18-01-06_16-26")
; htdocs master - [C:\xampp\apps\wordpress\htdocs] - ...\README.md [htdocs] - PhpStorm ahk_class SunAwtFrame ; mouseWindowTitle=0x1f0996 ;