Skip to content

Instantly share code, notes, and snippets.

Ismail Baaj ibaaj

  • Paris, France
Block or report user

Report or block ibaaj

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
@ibaaj
ibaaj / Edge Element stopped at its percentage seen in viewport
Created Jan 24, 2014
snippet of code working with skrollr to stop a Adobe Edge Composition at a defined timeline according to its percentage seen in viewport
View Edge Element stopped at its percentage seen in viewport
function percentageSeen (id) {
var $element = $('#'+id), $win = $(window),viewportHeight = $(window).height(),
scrollTop = $win.scrollTop(),
elementOffsetTop = $element.offset().top,
elementHeight = $element.height();
if (elementOffsetTop > (scrollTop + viewportHeight)) {
return 0;
@ibaaj
ibaaj / MiniGraphUI.java
Created Apr 19, 2016 — forked from karussell/MiniGraphUI.java
Alternative Roads to Rome
View MiniGraphUI.java
/*
* Licensed to GraphHopper and Peter Karich under one or more contributor
* license agreements. See the NOTICE file distributed with this work for
* additional information regarding copyright ownership.
*
* GraphHopper licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
View fader.sh
#!/bin/zsh
len=30
x=""
for i in *.mp4
do
x="$x $i -mix $len -mixer luma "
done
x="melt$x -filter greyscale -filter oldfilm -consumer avformat:fade_$(date +%s).mp4 vcodec=libx264 b=5000k acodec=aac ab=70k"
View diffimg.cpp
#include <opencv/cv.h>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>
using namespace cv;
using namespace std;
int main( int argc, char** argv )
{
@ibaaj
ibaaj / mirror.sh
Created May 9, 2016
A71 "surfing the clouds"
View mirror.sh
#!/bin/zsh
mkdir -p {frames,ftop,fbottom,final};
ffmpeg -i IMG_7197.mov -r 25 -qscale:v 2 frames/%05d.jpg ;
framesNumber=$(ls ./frames/*.jpg |wc -l|tr -d ' ');
C_H=540
H=1280
@ibaaj
ibaaj / fix-scoping.sh
Last active May 10, 2016
fix-scoping.sh
View fix-scoping.sh
#!/bin/zsh
mkdir -p {frames,final};
ffmpeg -i 03.mp4 -r 25 -qscale:v 2 frames/%05d.jpg ;
framesNumber=$(ls ./frames/*.jpg |wc -l|tr -d ' ');
W=720
@ibaaj
ibaaj / oldmov.sh
Created May 11, 2016
oldmovie avec MLT framework
View oldmov.sh
#!/bin/zsh
len=30
x=""
for i in *.mp4
do
x="$x $i -mix $len -mixer luma "
done
x="melt$x -filter greyscale -filter oldfilm -consumer avformat:fade_$(date +%s).mp4 vcodec=libx264 b=5000k acodec=aac ab=70k"
@ibaaj
ibaaj / central-symmetry.sh
Last active May 14, 2016
central-symmetry.sh
View central-symmetry.sh
#!/bin/bash
W=`identify ./large.jpg | cut -f 3 -d " " | sed s/x.*//` #width
H=`identify ./large.jpg | cut -f 3 -d " " | sed s/.*x//` #height
if [[ $W > $H ]]; then
NW=$H;
else
NW=$W;
View hall.sh
#!/bin/bash
W=`identify ./large.jpg | cut -f 3 -d " " | sed s/x.*//` #width
H=`identify ./large.jpg | cut -f 3 -d " " | sed s/.*x//` #height
if [[ $W > $H ]]; then
NW=$H;
else
NW=$W;
View double-down.sh
#!/bin/bash
W=`identify ./large.jpg | cut -f 3 -d " " | sed s/x.*//` #width
H=`identify ./large.jpg | cut -f 3 -d " " | sed s/.*x//` #height
if [[ $W > $H ]]; then
NW=$H;
else
NW=$W;
You can’t perform that action at this time.