Example with pecl/pledge:
$ cat test_pecl.php
<?php
var_dump(count(scandir('/etc')));
unveil(__DIR__, 'r');
ctrl + alt + shift + t = refactor this | |
alt + enter = allerlei shortcuts | |
ctrl + alt + l = reformat code | |
shift + f11 = show bookmarks | |
f11 = insert bookmark | |
alt + insert = file new | |
ctrl + n = navigate class | |
ctrl + shift + n = navigate file | |
ctrl + shift + f = find in path | |
ctrl + alt + shift + insert = commit file (eigen shortcut) |
#!/usr/bin/env php | |
<?php | |
require __DIR__.'/vendor/autoload.php'; | |
use Symfony\Component\Console\Cursor; | |
use Symfony\Component\Console\Input\InputInterface; | |
use Symfony\Component\Console\Output\OutputInterface; | |
use Symfony\Component\Console\SingleCommandApplication; | |
use Symfony\Component\Console\Terminal; |
#!/usr/bin/env php | |
<?php | |
require __DIR__.'/vendor/autoload.php'; | |
use Symfony\Component\Console\Cursor; | |
use Symfony\Component\Console\Input\InputInterface; | |
use Symfony\Component\Console\Output\OutputInterface; | |
use Symfony\Component\Console\SingleCommandApplication; | |
use Symfony\Component\Console\Terminal; |
<?php | |
namespace SomeDomain; | |
use Ctors\Enum; | |
class Company extends Enum | |
{ | |
public const GOOGLE = 'Google'; | |
public const TWITTER = 'Twitter'; |
<?php | |
if ($_SERVER['PHP_AUTH_USER'] !== 'tvlooy' || | |
$_SERVER['PHP_AUTH_PW'] !== 'secret' | |
) { | |
header('WWW-Authenticate: Basic realm="Login required"'); | |
header('HTTP/1.0 401 Unauthorized'); | |
echo 'Access denied.'; | |
exit; | |
} |
#!/bin/sh | |
# "include: /etc/unbound/ad-blacklist.conf" in /var/unbound/etc/unbound.conf | |
# run this script as a daily cron | |
# | |
# The list URLs were taken from the pi-hole project. | |
# More experimental lists are at https://github.com/pi-hole/pi-hole/blob/master/adlists.default | |
TMPFILE=$( mktemp get_dns_blacklists-XXXXXXXXX ) | |
trap 'rm -f $TMPFILE; exit 1' EXIT KILL INT QUIT TERM |
# Note that this is for people that want to build it from source, using pecl | |
# This code is in official OpenBSD ports now https://marc.info/?l=openbsd-ports-cvs&m=154270973708561 | |
pkg_add php-7.2.10 | |
ln -s /usr/local/bin/php-7.2 /usr/local/bin/php | |
ln -s /usr/local/bin/phpize-7.2 /usr/local/bin/phpize | |
ln -s /usr/local/bin/php-config-7.2 /usr/local/bin/php-config | |
pkg_add autoconf-2.69p2 | |
export AUTOCONF_VERSION=2.69 |
Index: httpd.conf.5 | |
=================================================================== | |
RCS file: /cvs/src/usr.sbin/httpd/httpd.conf.5,v | |
retrieving revision 1.76 | |
diff -u -p -u -r1.76 httpd.conf.5 | |
--- httpd.conf.5 14 Nov 2016 10:28:31 -0000 1.76 | |
+++ httpd.conf.5 21 Nov 2016 19:12:34 -0000 | |
@@ -128,6 +128,9 @@ If not specified, it defaults to | |
within the | |
.Xr chroot 2 |
DELIMITER $$ | |
DROP PROCEDURE IF EXISTS ANALYZE_INVALID_FOREIGN_KEYS$$ | |
CREATE | |
PROCEDURE `ANALYZE_INVALID_FOREIGN_KEYS`( | |
checked_database_name VARCHAR(64), | |
checked_table_name VARCHAR(64), | |
temporary_result_table ENUM('Y', 'N')) |