Skip to content

Instantly share code, notes, and snippets.

View yann-yinn's full-sized avatar

Yann yann-yinn

  • Yann
  • France, Nantes
View GitHub Profile
@staltz
staltz / introrx.md
Last active November 11, 2025 05:59
The introduction to Reactive Programming you've been missing
@marcjenkins
marcjenkins / .gitignore
Created April 17, 2014 17:36
.gitignore for MODX projects
# ignore everything in this directory
/*
# but not these
!.gitignore
!assets/
!core/
!_SASS/
!_JS/
@yched
yched / D8 dump script
Last active December 27, 2015 18:28
D8 dump/restore scripts - relies on Drush (which is currently broken on D8)
#!/bin/bash
# TO CONFIGURE
DRUSH='/usr/local/bin/drush'
DUMP_SUBFOLDER='dumps'
DUMP_NAME=$1
DRUPAL_ROOT=`$DRUSH st drupal_root --format=list`
DRUPAL_CONFIG=`$DRUSH st active_config_directory_path --format=list`
DUMP_DIR="$DRUPAL_ROOT/$DUMP_SUBFOLDER/$DUMP_NAME"
@opi
opi / gist:3359320
Created August 15, 2012 11:26
Drupal jQuery.ui accordion
<?php
drupal_add_library('system', 'ui.accordion');
drupal_add_js('jQuery(document).ready(function(){
jQuery("#wrapper").accordion({
header: ".header",
autoHeight: false,
clearStyle: true,
collapsible: true
});
@crtr0
crtr0 / client.js
Created June 8, 2012 17:02
A simple example of setting-up dynamic "rooms" for socket.io clients to join
// set-up a connection between the client and the server
var socket = io.connect();
// let's assume that the client page, once rendered, knows what room it wants to join
var room = "abc123";
socket.on('connect', function() {
// Connected, let's sign-up for to receive messages for this room
socket.emit('room', room);
});