Skip to content

Instantly share code, notes, and snippets.

View dunglas's full-sized avatar

Kévin Dunglas dunglas

View GitHub Profile
@dunglas
dunglas / example.php
Last active March 15, 2024 18:04
A GraphQL client using the Symfony HttpClient component
<?php
$query = <<<'GRAPHQL'
query GetUser($user: String!) {
user (login: $user) {
name
email
repositoriesContributedTo {
totalCount
}
@dunglas
dunglas / example.php
Created April 19, 2018 06:25
A minimalist GraphQL client for PHP
<?php
$query = <<<'GRAPHQL'
query GetUser($user: String!) {
user (login: $user) {
name
email
repositoriesContributedTo {
totalCount
}
@jhorsman
jhorsman / semver-regex.md
Last active March 29, 2024 05:25
Semantic versioning regex
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active May 2, 2024 05:55
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@danielalexiuc
danielalexiuc / StaticGzipPlugin.java
Created June 6, 2012 14:54
Here's how to get static resources minified and gzipped. Most addons and plugins I've seen don't handle static resources. Stick this file anywhere in the classpath (I put it in "util" directory) and stick the play.plugins file into your conf directory.
package util;
import com.google.common.io.Files;
import play.Logger;
import play.Play;
import play.PlayPlugin;
import play.libs.MimeTypes;
import play.mvc.Http;
import play.utils.Utils;
import play.vfs.VirtualFile;
@dunglas
dunglas / invite-friends.js
Last active May 23, 2016 20:56
Invite all your Facebook friends (v3)
// Scroll to the bottom of the friend list and type the following line in your console
// For checkboxes (e.g. invite to an event)
var c = document.querySelectorAll("a[role='checkbox']"); for (var i = 0; i < c.length; i++) c[i].click();
// For invite buttons (e.g. invite to like a page)
var c = document.querySelectorAll(".uiButton._1sm"); for (var i = 0; i < c.length; i++) c[i].click();
@AnsonT
AnsonT / gist:1115264
Created July 30, 2011 06:32
CoffeeScript debugging with node-inspector
node-inspector &
coffee --nodejs --debug app.coffee &
google-chrome http://127.0.0.1:8080/debug?port=5858 &
google-chrome http://127.0.0.1:3000 &