Skip to content

Instantly share code, notes, and snippets.

View ibaaj's full-sized avatar

Ismaïl Baaj ibaaj

  • Paris, France
View GitHub Profile
@ibaaj
ibaaj / hall.sh
Created May 14, 2016 03:55
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;
@ibaaj
ibaaj / central-symmetry.sh
Last active May 14, 2016 02:02
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;
@ibaaj
ibaaj / oldmov.sh
Created May 11, 2016 16:13
oldmovie avec MLT framework
#!/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 / fix-scoping.sh
Last active May 10, 2016 05:46
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 / mirror.sh
Created May 9, 2016 12:15
A71 "surfing the clouds"
#!/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 / diffimg.cpp
Created April 26, 2016 08:45
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 / fader.sh
Last active April 25, 2016 23:44
#!/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 / MiniGraphUI.java
Created April 19, 2016 10:13 — forked from karussell/MiniGraphUI.java
Alternative Roads to Rome
/*
* 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
@ibaaj
ibaaj / MITM -SSL-Proxies.md
Created December 7, 2015 03:55 — forked from jeremiahsnapp/MITM -SSL-Proxies.md
Man In The Middle (MITM) SSL Proxies - Simple ways to see traffic between an SSL server and client in clear text.

HTTP(S) specific MITM SSL Proxies

mitmproxy

mitmproxy is an excellent console app written in Python.

It is easy to use on Linux and OS X.

Use brew install mitmproxy to install it on OS X.

@ibaaj
ibaaj / unfollow.js
Created June 14, 2015 12:00
Unfollow all pages i've liked on facebook - Go to https://www.facebook.com/[YOURUSERNAME]/likes & Scroll down to show all pages & execute this script in the console
counter=0; var ids = [];
for(var i=0; i < document.getElementsByClassName('_42ft _4jy0 _5lzj _3spg _4jy3 _517h _51sy').length; i++){
var d = document.getElementsByClassName('_42ft _4jy0 _5lzj _3spg _4jy3 _517h _51sy')[i];
if(!/hidden_elem/g.test(d.className)){
counter++;
ids.push(i);
}
}
console.log(counter);