Go to Google bigquery and execute the following query replacing XXX with your GitHub login
This file contains 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 | |
BASE_PATH=`dirname $0`/.. | |
ASSETS_PATH=$BASE_PATH/app/Resources/assets | |
ASSETS_PATH2=$BASE_PATH/src/SensioLabs/Bundle/InsightAnalysisBundle/Resources/public | |
if [[ `which inotifywait` ]]; then | |
while true; do | |
inotifywait -r -e modify -e move -e create -e delete $ASSETS_PATH/ $ASSETS_PATH2/ | while read line; do | |
php $BASE_PATH/app/console assetic:dump --force |
This file contains 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 | |
register_tick_function(function() { | |
$bt = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1); | |
$last = reset($bt); | |
$info = sprintf("%s +%d\n", $last['file'], $last['line']); | |
file_put_contents('/tmp/segfault.txt', $info, FILE_APPEND); | |
// or | |
// file_put_contents('php://output', $info, FILE_APPEND); | |
}); |
These commands are needed every time you want to generate a new certificate signing request to give to an authority in order for them to generate and sign a certificate for you.
https://letsencrypt.org/ solves a lot of the pain involved with SSL certs, but sometimes you still need to go the "old school" route. I constantly forget how this stuff works, so I collected the most important commands (and what they do) here for easy copy & paste.
This file contains 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
package main | |
import ( | |
"fmt" | |
"io" | |
"net" | |
) | |
func main() { | |
ln, err := net.Listen("tcp", ":8080") |
This file contains 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 | |
<<<CONFIG | |
packages: | |
- "kriswallsmith/buzz: ^0.15.0" | |
- "symfony/console: ^3.2@dev" | |
CONFIG; | |
// Find you token on https://api.slack.com/docs/oauth-test-tokens | |
use Buzz\Message\Response; |
This file contains 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 | |
class Queue | |
{ | |
private $size; | |
private $onJobStart; | |
private $isJobRunning; | |
private $onJobFinish; | |
private $queued; |
This file contains 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 | |
<<<CONFIG | |
packages: | |
- "symfony/finder: ~3.0" | |
- "symfony/console: ~3.0" | |
CONFIG; | |
use Symfony\Component\Console\Application; | |
use Symfony\Component\Console\Input\InputArgument; | |
use Symfony\Component\Console\Input\InputInterface; |
This file contains 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 | |
const STREAM_OPEN_FOR_INCLUDE = 128; | |
final class HardCoreDebugLogger | |
{ | |
public static function register(string $output = 'php://stdout') | |
{ | |
register_tick_function(function () use ($output) { | |
$bt = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 1); |