Skip to content

Instantly share code, notes, and snippets.

Martin Lagrange supertinou

Block or report user

Report or block supertinou

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@supertinou
supertinou / 0_reuse_code.js
Created Jun 24, 2016
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@supertinou
supertinou / repeat-complete.directive.js
Created Jun 16, 2016
An AngularJS directive that allows to be aware when a ng-repeat has finish being rendered.
View repeat-complete.directive.js
// @author: @BenNadel
// Source : http://www.bennadel.com/blog/2592-hooking-into-the-complete-event-of-an-ngrepeat-loop-in-angularjs.htm
angular.module('app')
.directive("repeatComplete",
function( $rootScope ) {
// Because we can have multiple ng-repeat directives in
// the same container, we need a way to differentiate
// the different sets of elements. We'll add a unique ID
// to each set.
var uuid = 0;
@supertinou
supertinou / config.js
Created Apr 22, 2016
AngularJS : Capture and console log all broadcasts
View config.js
.config(function($provide) {
$provide.decorator("$rootScope", function($delegate) {
var Scope = $delegate.constructor;
var origBroadcast = Scope.prototype.$broadcast;
var origEmit = Scope.prototype.$emit;
Scope.prototype.$broadcast = function($scope) {
console.log("$broadcast was called on $scope " + $scope.$id + " with arguments:",
arguments);
return origBroadcast.apply(this, arguments);
@supertinou
supertinou / animated-gif.md
Created Feb 25, 2016 — forked from stephenlb/animated-gif.md
DIY How to make your own HD Animated GIF Generator
View animated-gif.md

HD Animated GIF Generator

You can make your own HD animated GIF generator.
Follow along with these commands to get started.

HD Animated GIF Generator

git clone git://source.ffmpeg.org/ffmpeg.git
cd ffmpeg
@supertinou
supertinou / 0.sh
Last active Sep 8, 2015
Snippets for the Realtime quiz tutorial
View 0.sh
git clone git@github.com:supertinou/livequiz.git && cd livequiz && git reset --hard SAMPLE-QUIZ-APP
View results_display.js.coffee
@ResultsDisplay = React.createClass
render: ->
<div className="list-group-item">
<div className="row">
<div className="col-md-2">
<img className='media-object' src="/images/graduated.png" />
</div>
<div className="col-md-9">
<h1>The quiz session is finished</h1>
<h3>Here are the results:</h3>
View success_notifier.js.coffee
@SuccessNotifier = React.createClass
render: ->
[image, text] = if this.props.success
['/images/correct.png','Well done !']
else
['/images/wrong.png', 'Wrong answer !']
<div className="list-group-item">
<div className="row">
<div className="col-md-2">
View ActivityFeed React component.md

feed

Usage

You can add an activity to the ActivityFeed component by passing to the newActivity property a hash representing the activity See the example below:

Displaying a question:

  activity = { 
@supertinou
supertinou / QuestionDisplay React component.md
Last active Nov 7, 2015
React component for displaying and answering questions
View QuestionDisplay React component.md

Component

Usage

You can display a question by passing to the questions property a representing a question See the example below:

Displaying a question:

question = { question: { title: What is the color of the sky ? ,
@supertinou
supertinou / Readme.md
Last active Jun 12, 2018
React component which displays participants statuses and refresh the statuses in Realtime.
View Readme.md

Component

Usage

You can display / refresh / add participants by passing to the participants property an array of participants. See the examples below:

Displaying some participants:

participants = [
You can’t perform that action at this time.