Skip to content

Instantly share code, notes, and snippets.

Working from home (during free time)

Flamur Kasa FKasa

View GitHub Profile
FKasa /
Last active Jan 10, 2019
sq-MK regional settings in 1 line
$RegKeyPath = "HKCU:\Control Panel\International";Set-ItemProperty -Path $RegKeyPath -Name LocaleName -Value "sq-MK";Set-ItemProperty -Path $RegKeyPath -Name iFirstDayOfWeek -Value "0";Set-ItemProperty -Path $RegKeyPath -Name sShortTime -Value "HH:mm";Set-ItemProperty -Path $RegKeyPath -Name sTimeFormat -Value "HH:mm:ss";Set-ItemProperty -Path $RegKeyPath -Name sList -Value ",";Set-ItemProperty -Path $RegKeyPath -Name sTime -Value ":";Set-ItemProperty -Path $RegKeyPath -Name sThousand -Value "'";Set-ItemProperty -Path $RegKeyPath -Name sMonThousandSep -Value "'";Set-ItemProperty -Path $RegKeyPath -Name sLongDate -Value "dd MMMM yyyy";Set-ItemProperty -Path $RegKeyPath -Name sShortDate -Value "dd MMM yy";Set-TimeZone -Id "Central European Standard Time"
FKasa /
Created Mar 5, 2018
Finds evil eval-s hidden in comments, whitespace or plain sight
find ./backup/ -name \*.php -type f -print0 | xargs -0 grep "\beval[^\w]\s*\/*\s*[\/|\*]?\s*\(?" -C 3 --color -Pzo > ev.txt
FKasa / fair_split.php
Created Jun 29, 2017
PHP file database with collision prevention
View fair_split.php
$debnr = json_decode( file_get_contents('json_holder.txt') );
@$min = (int)reset(array_keys((array)$debnr, min((array)$debnr)));
file_put_contents('json_holder.txt', json_encode($debnr,JSON_FORCE_OBJECT), LOCK_EX);
FKasa / user_keymap
Created Feb 21, 2015
Git hotkeys for Sublime (commit and push)
View user_keymap
{ "keys": ["f1"], "command": "git_quick_commit" },
{ "keys": ["f5"], "command": "git_raw", "args": {"command": "git push", "args": {"may_change_files": false} } }
View designer.html
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../cool-clock/cool-clock.html">
<polymer-element name="my-element">
You can’t perform that action at this time.