Skip to content

Instantly share code, notes, and snippets.

View mpgn's full-sized avatar
🕹️
Impose ta chance, serre ton bonheur et va vers ton risque.

mpgn

🕹️
Impose ta chance, serre ton bonheur et va vers ton risque.
View GitHub Profile
@mpgn
mpgn / jsbin.cocatuta.html
Created August 9, 2014 19:57
YouTube Player paused when iframe is not visible on the screen. Live example http://jsbin.com/cocatuta/15/
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="[add your bin description]" />
<script src="//code.jquery.com/jquery-2.1.0.min.js"></script>
<meta charset="utf-8">
<title>JS Bin</title>
</head>
<body>
<iframe id="player" type="text/html" width="640" height="390"
@mpgn
mpgn / main.c
Last active August 29, 2015 14:07
C pow vs shift
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <unistd.h>
#include <time.h>
int main() {
const size_t nTests = 10000000;
@mpgn
mpgn / app.js
Last active August 29, 2015 14:17
angular-vlc example
var app = angular.module('app', [
'ngResource',
'ngRoute',
'ui.bootstrap',
'kdarcel.vlc-player',
'kdarcel.vlc-player.tpl',
]);
@mpgn
mpgn / list_to_matrix.py
Last active November 10, 2015 21:15
List to matrix python
def split_r(arr, size):
arrs = []
while len(arr) > size:
pice = arr[:size]
arrs.append(pice)
arr = arr[size:]
arrs.append(arr)
return arrs
K = separation
@mpgn
mpgn / brutus-combinaison.go
Last active March 18, 2016 10:35
brute force hash (md5, sha1) first char in Go using combinaison from Python or rand
package main
import (
"fmt"
"os"
"crypto/md5"
//"crypto/sha1"
//"math/rand"
"time"
"encoding/hex"
@mpgn
mpgn / test.md
Last active April 1, 2017 18:00

test test

Test for dynamic rendering :

[{{ config['WEBSITE_NAME'] }}]({{ url_for("home.index") }})

alert(1);
~/Android/Sdk/emulator $ ./emulator @Nexus_4_API_26 -http-proxy 127.0.0.1:8080
https://wiki.archlinux.org/index.php/Bluetooth_headset
https://unix.stackexchange.com/questions/258074/error-when-trying-to-connect-to-bluetooth-speaker-org-bluez-error-failed
@mpgn
mpgn / ftpserver.py
Created October 19, 2017 13:18 — forked from scturtle/ftpserver.py
simple ftp server by python
#!/usr/bin/env python2
# coding: utf-8
import os,socket,threading,time
#import traceback
allow_delete = False
local_ip = socket.gethostbyname(socket.gethostname())
local_port = 8888
currdir=os.path.abspath('.')