This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git filter-branch --env-filter ' | |
WRONG_EMAIL="[email protected]" | |
NEW_NAME="FooBar" | |
[email protected]" | |
if [ "$GIT_COMMITTER_EMAIL" = "$WRONG_EMAIL" ] | |
then | |
export GIT_COMMITTER_NAME="$NEW_NAME" | |
export GIT_COMMITTER_EMAIL="$NEW_EMAIL" | |
fi |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows Registry Editor Version 5.00 | |
; Ensure all ICON_LOCATION and EXECUTABLE_LOCATION paths are escaped | |
[HKEY_CLASSES_ROOT\*\shell\Sublime] | |
""="Open APPNAME" | |
"Icon"="ICON_LOCATION" | |
[HKEY_CLASSES_ROOT\*\shell\Sublime\command] | |
""="EXECUTABLE_LOCATION \"%1\"" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE FUNCTION array_sort( | |
text[] | |
) | |
RETURNS text[] | |
LANGUAGE sql | |
IMMUTABLE | |
STRICT | |
AS $$ | |
SELECT ARRAY( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Finds whether a string ends with another string | |
* | |
* @param string $haystack | |
* @param string $needle | |
* @return boolean | |
*/ | |
function str_endswith($haystack, $needle) { | |
$strlen = strlen($haystack); | |
$testlen = strlen($needle); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (!function_exists('get_called_class')) { | |
/** | |
* Gets the name of the class the static method is called in. | |
* | |
* @return string | |
*/ | |
function get_called_class() { | |
$arr = array(); | |
$arrTraces = debug_backtrace(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE FUNCTION array_filter_blanks( | |
ANYARRAY | |
) | |
RETURNS ANYARRAY | |
LANGUAGE sql | |
IMMUTABLE | |
STRICT | |
AS $$ | |
SELECT ARRAY( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE FUNCTION reset_sequences() | |
RETURNS void | |
LANGUAGE plpgsql | |
VOLATILE | |
AS $$ | |
DECLARE | |
m_Record RECORD; | |
BEGIN |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rem Specify the location of the new Notepad application here | |
set NOTEPAD_APP=%~dp0notepad.exe | |
reg add "HKLM\Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\notepad.exe" /v "Debugger" /t REG_SZ /d "\"%NOTEPAD_APP%\" -z" /f |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# usage: watch [command] [sleep duration] | |
while :; do | |
clear | |
date | |
bash -c "$1" | |
sleep ${2:-1} | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<Wix> | |
<Product> | |
<!-- skip licence dialog --> | |
<UI> | |
<Publish Dialog="WelcomeDlg" | |
Control="Next" | |
Event="NewDialog" | |
Value="InstallDirDlg" | |
Order="2">1</Publish> |
NewerOlder