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
#/bin/sh | |
# sudo apt install libxml2-dev libkrb5-dev libsqlite3-dev libbz2-dev libcurl4-openssl-dev libpng-dev libwebp-dev libjpeg-dev libgmp-dev libldap-dev libonig-dev libpq-dev libsodium-dev libargon2-dev libzip-dev | |
./configure --prefix=/home/finwe/php8.4 \ | |
--enable-fpm \ | |
--with-fpm-user=finwe \ | |
--with-fpm-group=finwe \ | |
--with-openssl \ | |
--with-pcre-jit \ |
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 TABLE failed_jobs ( | |
id SERIAL NOT NULL PRIMARY KEY, | |
connection text DEFAULT NULL, | |
queue text DEFAULT NULL, | |
payload text DEFAULT NULL, | |
exception text DEFAULT NULL, | |
failed_at timestamp(0) without time zone DEFAULT ('now'::text)::timestamp(0) with time zone NOT 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
#!/bin/bash | |
./configure \ | |
--with-http_ssl_module \ | |
--with-http_v2_module \ | |
--sbin-path=/usr/local/sbin/nginx \ | |
--conf-path=/etc/nginx/nginx.conf \ | |
--pid-path=/var/run/nginx.pid \ | |
--error-log-path=/var/log/nginx/error.log \ | |
--http-log-path=/var/log/nginx/access.log \ | |
--user=www-data \ |
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 date_interval(DateTime $begin, DateTime $end = NULL) | |
{ | |
if (!$end) { | |
return $begin->format('j. n. Y'); | |
} | |
$begin = array_reverse(str_split($begin->format('j. n. Y'))); | |
$end = array_reverse(str_split($end->format('j. n. Y'))); |
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
@namespace url(http://www.w3.org/1999/xhtml); | |
@-moz-document domain("trello.com") { | |
body, input, select, textarea { | |
font: 13px/16px Calibri, "Helvetica Neue", Arial, Helvetica, sans-serif !important; | |
} | |
.list-card.active-card { | |
border-color: #AAA !important; |
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 | |
/** | |
* File operations wrapper class | |
* | |
* @author Finwe | |
*/ | |
class File | |
{ |
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 bash by HABR (modified by Dundee & Finwe) | |
export PSORIG="$PS1" | |
function gitbranch() { | |
branch="$(git branch 2>/dev/null | grep '*' | cut -d" " -f2-)" | |
dirty="$(git status -s 2>/dev/null)" | |
if [ -n "$dirty" ] ; then | |
color="1;33m" | |
else | |
color="0;33m" |
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 | |
array_reduce( | |
$objects, // array of objects, arrays... | |
function ($array, $item) { | |
$array[$item->getId()] = $item; // $item is current element | |
return $array; // $array is whole array that will be returned | |
}, | |
array() // begin with empty array - strict standards | |
); |
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 | |
private $knownAnnotations = array( | |
// phpdoc | |
'@param' => NULL, | |
'@var' => NULL, | |
'@return' => NULL, | |
'@author' => NULL, | |
'@license' => NULL, | |
'@see' => 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 | |
return (int)("-" . Rand(100,999) . Rand(100,999) . Rand(100,999)); |
NewerOlder