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 / Rgb2hsv in Coffeescript
Created Feb 6, 2014
Rgb2hsv in Coffeescript
View Rgb2hsv in Coffeescript
rgb2hsv (r,g,b) ->
r=r/255
g=g/255
b=b/255
max = Math.max(r,g,b)
min = Math.min(r,g,b)
v = max
d = max - min
@ibaaj
ibaaj / parsing_essentia_yaml_export.js
Last active Aug 29, 2015
Parsing essentia yaml export - find . -name "*.yaml" -exec node conv.js {} \;
View parsing_essentia_yaml_export.js
yaml = require('js-yaml');
fs = require('fs');
try {
var doc = yaml.safeLoad(fs.readFileSync(process.argv[2], 'utf8'));
var nLine = process.argv[2] + ','
+ doc.metadata.audio_properties.length + ','
+ doc.rhythm.bpm + ','
@ibaaj
ibaaj / laptop.local.linux
Last active Aug 29, 2015
throughbot/laptop
View laptop.local.linux
#!/bin/sh
sudo add-apt-repository ppa:webupd8team/atom
sudo add-apt-repository ppa:jon-severinsson/ffmpeg
sudo add-apt-repository ppa:jerzy-kozera/zeal-ppa
sudo apt-get update
sudo apt-get install atom
sudo apt-get install mongodb
sudo apt-get install npm
sudo apt-get install node
sudo npm install -g coffee-script
@ibaaj
ibaaj / pageMonitor.js
Last active Aug 29, 2015
Page Monitor NodeJS - usage: node pageMonitor.js http://url.com/ 300
View pageMonitor.js
var http = require('http');
var url = require("url");
var crypto = require('crypto');
if(process.argv.length != 4)
{
console.log('Syntax ::');
console.log('node pagemonitor.js http://my-url-to-monitor.com 300');
console.log('with 300 the interval check (in seconds (300s = 5min)).');
process.exit(1);
@ibaaj
ibaaj / auto.js
Created Nov 3, 2014
game.ioxapp.com/color/
View auto.js
setInterval(function(){
var list = document.getElementById("box").getElementsByTagName("span"), bgUsed={};
for (var i = 0, len = list.length; i < len; i++) {
var e = list[i].style.backgroundColor;
if(Object.keys(bgUsed).length==0){bgUsed[e]=i; continue;}
if(!bgUsed.hasOwnProperty(e)) {bgUsed[e]=i; continue; }
else if(Object.keys(bgUsed).length > 1) { delete bgUsed[e]; break;}
}
@ibaaj
ibaaj / twitter-block.py
Created Nov 11, 2014
Twitter block a list of user with TwitterAPI
View twitter-block.py
import codecs
from datetime import datetime
import sys
from TwitterAPI import TwitterAPI, TwitterOAuth, TwitterRestPager
###Supposed you have a large list of username like this in a txt file (here: o.txt) :
###@aaaa
###@bbbb
###@cccc
###....
View .bash_profile
export PATH=/usr/local/bin:$PATH
alias NBContrast="convert $1 -type Grayscale -contrast $2"
alias imgdim='sips -g pixelHeight -g pixelWidth $1'
alias cx='chmod +x'
mcd() { mkdir -p "$1" && cd "$1"; }
qre() { qrencode -o /tmp/a.jpg '$1' && open "/tmp/a.jpg" && sleep 1 && rm "/tmp/a.jpg"; }
alias l='ls -al'
alias dieu='sudo su root -s /bin/zsh'
alias fuck='sudo su root -s /bin/zsh'
export iOSOpenDevPath=/opt/iOSOpenDev
@ibaaj
ibaaj / grabber.py
Last active Aug 29, 2015
facebook Graph online people / hour
View grabber.py
import sys
import os
import urllib2
import json
import urllib
from time import strftime, sleep
def write_to_file(data):
if os.path.exists("fb_data.txt"):
@ibaaj
ibaaj / unfollow.js
Created Jun 14, 2015
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
View unfollow.js
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);
@ibaaj
ibaaj / MITM -SSL-Proxies.md
Created Dec 7, 2015 — 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.
View MITM -SSL-Proxies.md

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.

You can’t perform that action at this time.