This file contains 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 | |
/** | |
* Returns the current scale value used by bcmath. | |
* | |
* @return int | |
*/ | |
function getbcscale() { | |
$scale = strlen(bcadd('0', '0')) - 2; | |
if ($scale === -1) { | |
$scale = 0; |
This file contains 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
'defer' puts statements on a LIFO stack and executes them right before the function returns. | |
<?php | |
function fooz() { function fooz() { | |
defer echo 'bai'; | |
defer echo 'thx'; ... becomes ... | |
echo 'k'; echo 'k'; | |
echo 'thx'; | |
echo 'bai'; | |
} } |
This file contains 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 en(array $a) | |
{ | |
$b = array($a[0]); | |
for ($i = 1, $l = count($a); $i < $l; $i++) { | |
$j = count($b) - 1; | |
$x = explode('-', $b[$j]); | |
if ((reset($x) >= end($x) && $a[$i] == end($x) - 1) || (reset($x) <= end($x) && $a[$i] == end($x) + 1)) { |
This file contains 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
// ==UserScript== | |
// @name Jira "Assign to me" | |
// @namespace * | |
// @include */CreateIssue.jspa | |
// ==/UserScript== | |
var target = document.getElementById('assignee'); | |
if (target.parentNode.hasChildNodes) { | |
for (var i = 0; i < target.parentNode.childNodes.length; i++) { | |
var child = target.parentNode.childNodes[i]; |
This file contains 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
Welcome to the MySQL monitor. Commands end with ; or \g. | |
Your MySQL connection id is 3 | |
Server version: 5.1.49-community MySQL Community Server (GPL) | |
Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. | |
This software comes with ABSOLUTELY NO WARRANTY. This is free software, | |
and you are welcome to modify and redistribute it under the GPL v2 license | |
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. |
This file contains 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
Bringing machine 'default' up with 'virtualbox' provider... | |
[default] Clearing any previously set forwarded ports... | |
[default] Creating shared folders metadata... | |
[default] Clearing any previously set network interfaces... | |
[default] Preparing network interfaces based on configuration... | |
[default] Forwarding ports... | |
[default] -- 22 => 2222 (adapter 1) | |
[default] Running 'pre-boot' VM customizations... | |
[default] Booting VM... | |
[default] Waiting for machine to boot. This may take a few minutes... |