Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Alexandre Balmes pocky

🎯
Focusing
Block or report user

Report or block pocky

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 gist:dbe60002eb550c27395e17a8d84527fc
<?php
// don't forget to run PHP with root
function russian($roulette) {
shuffle($roulette);
$kaboum = $roulette[0];
if (null === $kaboum) {
return 'Try again!';
View RegistrationRequest.php
<?php
declare(strict_types=1);
namespace App\Application\Request\Account;
use Symfony\Component\PropertyAccess\PropertyAccess;
use Symfony\Component\Validator\Constraints as Assert;
use Symfony\Component\Validator\Exception\ValidatorException;
use Symfony\Component\Validator\Validation;
@pocky
pocky / deletion.rb
Created May 14, 2018
My Tweet deletion script
View deletion.rb
#!/usr/bin/env ruby
require "tweet_deletion"
require 'yaml'
config = YAML.load_file('config.yml')
TweetDeletion.with( config ) do
for_archive("./archive/") do
keep_if earlier_than(3.years.ago), tag:" 📅 " # When I was young, I was.
View genesis_public_key
04108239d89ff5fb16229c83007895d9846cb167adee6c58f2515048e7ad13af28c743cf2717049cf70c8decc2e951bc36469cf9826d67c7ac8a373568b0f72191
@pocky
pocky / output.txt
Created Jul 13, 2016
docker pi-cluster
View output.txt
docker info  01:30:22
Containers: 3
Running: 3
Paused: 0
Stopped: 0
Images: 9
Server Version: swarm/1.2.3
Role: primary
Strategy: spread
Filters: health, port, containerslots, dependency, affinity, constraint
View InMemoryRepository.php
<?php
namespace Infrastructure\Website\Persistence;
use Domain\Website\Entity\Website;
use Domain\Website\ValueObject\WebsiteId;
use Domain\Website\Repository\WebsiteRepository;
class InMemoryRepository implements WebsiteRepository
{
@pocky
pocky / cleandb.php
Created Aug 11, 2015
HtmlPurifier for word/wordpress (assuming files are in a direct subdirectory of Wordpress root path)
View cleandb.php
<?php
include('../wp-load.php');
include('vendor/autoload.php');
$config = \Symfony\Component\Yaml\Yaml::parse(file_get_contents('config.yml'));
$purifier_config = HTMLPurifier_Config::createDefault();
foreach ($config as $k => $v) {
$purifier_config->set($k, $v);
View gist:ecdbfb90727a63d811ce
<?php
/**
* Class Holidays
*/
class Holidays
{
/**
* @var array
*/
View keybase.md

Keybase proof

I hereby claim:

  • I am pocky on github.
  • I am pocky (https://keybase.io/pocky) on keybase.
  • I have a public key whose fingerprint is 00C9 A1DE E030 9838 7341 0901 3F70 833B 886B A122

To claim this, I am signing this object:

View php.ini
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; PHP's initialization file, generally called php.ini, is responsible for
; configuring many of the aspects of PHP's behavior.
; PHP attempts to find and load this configuration from a number of locations.
; The following is a summary of its search order:
You can’t perform that action at this time.