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
Show hidden characters
[ | |
// Change font size with ctrl+scroll wheel | |
{ "button": "scroll_down", "modifiers": ["ctrl"], "command": "null" }, | |
{ "button": "scroll_up", "modifiers": ["ctrl"], "command": "null" } | |
] |
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
<?php | |
function copy_function($name) { | |
$reflection = new ReflectionFunction($name); | |
return function(...$arguments) use($reflection) { | |
return call_user_func_array([$reflection, 'invoke'], $arguments); | |
}; | |
} | |
$fn = copy_function('is_int'); |
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
/** | |
* To number format. | |
* @param {Integer} decimals? | |
* @param {String} decimalsSeparator? | |
* @param {String} thousandsSeparator? | |
* @return {String} | |
* @links http://php.net/number_format, https://stackoverflow.com/q/2901102 | |
*/ | |
Number.prototype.toNumberFormat = function(decimals, decimalsSeparator, thousandsSeparator) { | |
decimalsSeparator = decimalsSeparator || '.'; |
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
/** | |
* Element.prototype.classList for IE8/9, Safari. | |
* @author Kerem Güneş <[email protected]> | |
* @copyright Released under the MIT License <https://opensource.org/licenses/MIT> | |
* @version 1.2 | |
* @see https://developer.mozilla.org/en-US/docs/Web/API/Element/classList | |
*/ | |
;(function() { | |
// Helpers. | |
var trim = function(s) { |
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
<?php | |
function time_zone_offset_to_identifier(string $offset, int $offsetIndex = 0) { | |
static $timeZoneOffsets = []; | |
if (empty($timeZoneOffsets)) { | |
foreach(timezone_identifiers_list() as $timeZoneIdentifier) { | |
$dateTimeZone = new DateTimeZone($timeZoneIdentifier); | |
$dateTime = new DateTime('NOW', $dateTimeZone); | |
$timeZoneOffsets[$dateTimeZone->getOffset($dateTime)][] = $timeZoneIdentifier; | |
} | |
} |
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"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<!-- | |
Inspired GitHub Color Scheme for Sublime Text 3 | |
Copyright 2015 Seth Lopez | |
Released under the MIT License <http://opensource.org/licenses/MIT> | |
https://github.com/sethlopezme/InspiredGitHub.tmtheme | |
--> | |
<plist version="1.0"> | |
<dict> |
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"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<!-- | |
Inspired GitHub Color Scheme for Sublime Text 3 | |
Copyright 2015 Seth Lopez | |
Released under the MIT License <http://opensource.org/licenses/MIT> | |
https://github.com/sethlopezme/InspiredGitHub.tmtheme | |
--> | |
<!-- | |
ed6a43 > this |
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
<?php | |
function trim_word_left($s, array $words) { | |
foreach ($words as $word) { | |
while (($p = mb_strpos($s, $word)) === 0) { | |
$s = mb_substr($s, $p + mb_strlen($word)); | |
$s = trim($s); | |
} | |
} | |
return $s; | |
} |
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"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>comment</key> | |
<string>TODO: | |
• Try to improve parameters list syntax – scope numbers, ‘=’, ‘,’ and possibly be intelligent about entity ordering | |
• Is meta.function-call the correct scope? I've added it to my theme but by default it's not highlighted</string> | |
<key>fileTypes</key> | |
<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
<!-- JavaScript.tmLanguage --> | |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>comment</key> | |
<string>JavaScript Syntax: version 2.0</string> | |
<key>fileTypes</key> | |
<array> | |
<string>js</string> |