Skip to content

Instantly share code, notes, and snippets.

View lyrixx's full-sized avatar
😀

Grégoire Pineau lyrixx

😀
View GitHub Profile
@lyrixx
lyrixx / refresh-assetic.sh
Last active August 29, 2015 13:56
Refresh assetic on any modification
#!/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
<?php
class baseDog
{
public $name;
}
class dog
{
protected $name;
@pborreli
pborreli / Instruction.md
Last active December 19, 2015 09:29
How to retrieve your GitHub Pull Request count using Google bigquery

Go to Google bigquery and execute the following query replacing XXX with your GitHub login

@webmozart
webmozart / git-find-merge
Created November 15, 2012 14:32
Script to find the merge and PR a commit occurred in
#!/bin/bash
COMMIT=$1
BRANCH=$2
if [ -z $BRANCH ]; then
BRANCH="master"
fi
perl -ne 'print if ($seen{$_} .= @ARGV) =~ /10$/' \
<(git rev-list --ancestry-path --oneline $COMMIT..$BRANCH) \
@ladyada
ladyada / adafruitlightpaint4pi.py
Created August 10, 2012 00:26
Adafruit Light Painting with Pi
#!/usr/bin/python
# Light painting / POV demo for Raspberry Pi using
# Adafruit Digital Addressable RGB LED flex strip.
# ----> http://adafruit.com/products/306
import RPi.GPIO as GPIO, Image, time
# Configurable values
filename = "hello.png"
@lyrixx
lyrixx / Queue.php
Last active March 15, 2019 14:56
PHP async queue (Process (or not))
<?php
class Queue
{
private $size;
private $onJobStart;
private $isJobRunning;
private $onJobFinish;
private $queued;
<?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;
@n1k0
n1k0 / 404checker.js
Created January 11, 2013 10:55
A CasperJS script to check for 404 & 500 internal links on a given website
/**
* This casper scipt checks for 404 internal links for a given root url.
*
* Usage:
*
* $ casperjs 404checker.js http://mysite.tld/
* $ casperjs 404checker.js http://mysite.tld/ --max-depth=42
*/
/*global URI*/
@lyrixx
lyrixx / README.md
Last active February 21, 2020 13:51
Add shared tracks in to slack to a Spotify Playlist
@lyrixx
lyrixx / README.md
Last active March 17, 2020 16:34
Spotify does not handle Media Keys

Debug media keys and Spotify

TL;DR: There is a bug in gnome that have been fixed in 3.3. But you can temporary fix this issue with: pkill gsd-media-keys

Let's Debug

  1. We check logs