Skip to content

Instantly share code, notes, and snippets.

@JaminFarr
JaminFarr / blade-mixins.pug
Last active April 16, 2020 15:57
Laravel Blade mixins for jade for use with laravel-elixir-jade
//- For use with https://github.com/CREEATION/laravel-elixir-jade
mixin blade()
='\r\n'
block
='\r\n'
mixin phpblock()
!='\r\n<?php '
@ngyuki
ngyuki / README.md
Last active July 15, 2022 15:12
tcp chat by coroutine

[PHP]PHP のコルーチンを使ってみる

PHP 5.5 でコルーチンが実装されましたが、全く使っていなかったので使ってみました。

コルーチンとは

コルーチンとは何なのかというと・・・Wikipedia によると次の通りです。

コルーチン - Wikipedia

@egruz
egruz / SlackHandler.php
Last active July 17, 2016 15:24
Monolog Slack Handler
<?php
/*
* Monolog Slack Handler
*
* This adds the ability to post a message to your Chosen Slack channel easily with Monolog.
*
* Here is an example of using this handler:
* $logger->pushHandler(new SlackHandler("your-account-name", "your-token-code", "#your-channel-name", "name-to-post-message-as", "url-to-image-file", Logger::INFO, true));
*
@hSATAC
hSATAC / 256color.pl
Created July 20, 2011 14:48
256color.pl
#!/usr/bin/perl
# Author: Todd Larason <jtl@molehill.org>
# $XFree86: xc/programs/xterm/vttests/256colors2.pl,v 1.2 2002/03/26 01:46:43 dickey Exp $
# use the resources for colors 0-15 - usually more-or-less a
# reproduction of the standard ANSI colors, but possibly more
# pleasing shades
# colors 16-231 are a 6x6x6 color cube
for ($red = 0; $red < 6; $red++) {