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 | |
$eventsRebuilded = array(); | |
foreach($events as $event) { | |
foreach($event->dates as $date) { | |
$datestart = date('Y-m-d',strtotime($date->datestart)); | |
if(!isset($eventsRebuilded[$date->datestart])) { | |
$eventsRebuilded[$date->datestart] = array(); | |
} |
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
$('body').append('<iframe src="about:blank" name="extractIframe" id="extractIframe"></iframe>') | |
$('form[name=MyArchivedPlaylistsForm]').attr('target','extractIframe'); | |
var binded = false; | |
var rowIndex = 1; | |
function loadNext() { | |
if(!binded) { | |
$('#extractIframe').bind('load',function() { | |
console.log('loaded'); | |
if(!$('#extractIframe').contents().find('form[name=PlaylistContentForm] table').length) { | |
return; |
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 Message extends Eloquent { | |
protected $table = 'messages'; | |
protected $guarded = array(); | |
protected $fillable = array('filename', 'duration', 'from', 'city'); | |
protected $hidden = array('from','city','id','created_at','updated_at'); |
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
var CONFIG = require('./config'); | |
var mongoose = require('mongoose'), | |
express = require('express'), | |
app = express(), | |
sanitize = require('validator').sanitize, | |
server = require('http').createServer(app), | |
io = require('socket.io').listen(server, { | |
'flash policy server' : false | |
}); |
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
<script type="text/javascript"> | |
var _echolo = _echolo || []; | |
//S'il y a un utilisateur de connecté, on le spécifie avec son ID | |
_echolo.push(['setUser', 12]); | |
//Pour tracker une visite sur une page | |
_echolo.push(['trackVisit']); |
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
import { DefaultNetworkLayer } from 'react-relay'; | |
import superagent from 'superagent'; | |
import superagentRetry from 'superagent-retry'; | |
import superagentPromise from 'superagent-promise'; | |
import each from 'lodash/each'; | |
// Add plugins to superagent | |
superagentRetry(superagent); | |
superagentPromise(superagent, Promise); |
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
<!-- This embed code is similar to YouTube --> | |
<!-- You can edit the size by changing the "width" and "height" value --> | |
<iframe src="http://theinvisiblewalls.btselem.org/" width="800" height="600" frameborder="0" allowfullscreen></iframe> | |
<!-- For assistance, contact dev@atelierfolklore.ca --> |
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/zsh | |
LAST_VERSION=$(git tag -l | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n | tail -n 1) | |
NEXT_VERSION=$(echo $LAST_VERSION | awk -F. -v OFS=. 'NF==1{print ++$NF}; NF>1{if(length($NF+1)>length($NF))$(NF-1)++; $NF=sprintf("%0*d", length($NF), ($NF+1)%(10^length($NF))); print}') | |
VERSION=${1-${NEXT_VERSION}} | |
DEFAULT_MESSAGE="Release" | |
MESSAGE=${2-${DEFAULT_MESSAGE}} | |
RELEASE_BRANCH="release/$VERSION" | |
git add . |
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 | |
SOURCE_PATH="$1" | |
DEST_PATH="$2" | |
SOURCE_EXTENSION=".mov" | |
CONSTANT_RATE_FACTOR=24 | |
convert_mp4 () { | |
ffmpeg -y -i "$1" \ | |
-codec:v libx264 \ |
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
/* eslint-disable jsx-a11y/anchor-is-valid */ | |
import React, { Fragment } from 'react'; | |
import PropTypes from 'prop-types'; | |
import useSound from './useSound'; | |
const propTypes = { | |
}; |