Skip to content

Instantly share code, notes, and snippets.

aktuba aktuba

Block or report user

Report or block aktuba

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View php.php
<?php
function users($count, $state, $stacktrace)
{
echo "users: {$count}\n\tstate:".strval($state)."\n\ttrace: ".count($stacktrace)."\n";
return 'users';
}
function comments($count, $state, $stacktrace)
{
View php.php
<?php
function users($count, $state, $stacktrace)
{
echo "users: {$count}\n\tstate:".strval($state)."\n\ttrace: ".count($stacktrace)."\n";
return 'users';
}
function comments($count, $state, $stacktrace)
{
View query.php
<?php
protected static function getDefaultQuery(?User $user = null, string $prefix = 'n'): Builder {
$table = \Cache::get('arr')->callback(__METHOD__, function() use($prefix) {
return (new static)->getTable()." as {$prefix}";
});
$result = static::query()->from($table);
if (null !== $user && $user->exists) {
$user->addIgnoresToQuery($result, ['user', 'doc', 'category'], $prefix);
View query.php
<?php
protected static function getDefaultQuery(?User $user = null, string $prefix = 'n'): Builder {
$table = \Cache::get('arr')->callback(__METHOD__, function() use($prefix) {
return (new static)->getTable()." as {$prefix}";
});
$result = static::query()->from($table);
if (null !== $user && $user->exists) {
$user
View db.sql
select
n.*,
nt.`before_cut`,
nt.`cut_text`,
d.`domain` as `doc_domain`,
d.`openness` as `doc_openness`,
d.`name` as `doc_name`,
c.`id` as `category_id`,
c.`domain` as `category_domain`,
c.`name` as `category_name`,
View gist:7e023843f1be639673802667548a531c
<?php declare(strict_types=1);
namespace Model;
use Illuminate\Database\Eloquent\Relations\HasOne;
/**
* Class Parking
* @package Model
*
View youtube.com
php test.php
Whois Server Version 2.0
Domain names in the .com and .net domains can now be registered
with many different competing registrars. Go to http://www.internic.net
for detailed information.
Server Name: YOUTUBE.COM.BLACKRAMINC.COM
IP Address: 208.65.153.238
@aktuba
aktuba / placeholdit.php
Created Mar 30, 2017 — forked from uhtred/placeholdit.php
PHP: Placehold it image
View placeholdit.php
<?php
/*
How to use
/940x278
/940x278/000000
/940x278&text=Texto
/940x278/000000&text=Texto
RewriteEngine On
View upload
function image_upload($ps) {
if ($ps != PS) Request::redirect();
Loader::helper('image');
$servers = Loader::config('servers', TRUE);
$send_to = 'nfs';
if (isset($servers['load_to']) && $servers['load_to'] == 'ftp') {
$send_to = 'ftp';
}
View phalcon micro
<?php
use Phalcon\Mvc\Micro;
$time = microtime(true);
$mem = memory_get_peak_usage(true);
$app = new Micro();
$app->get(
"/",
You can’t perform that action at this time.