This file contains hidden or 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
| HttpRequest::HttpRequest (const std::string& url) | |
| :attributeCount_(0), | |
| url_(url), | |
| hostname_(url.substr(0, url.find_first_of('/'))), | |
| path_(url.substr(url.find_first_of('/'))), | |
| resolver_(io_service_), | |
| socket_(io_service_) | |
| { | |
| //check if a port is in the hostname. | |
| size_t index = hostname_.find_first_of(':'); |
This file contains hidden or 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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <netdb.h> | |
| #include <netinet/in.h> | |
| #include <string.h> | |
| #include <sys/socket.h> | |
| #include <sys/types.h> | |
| #include <unistd.h> | |
| #define BUFFER_SIZE 128 |
This file contains hidden or 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
| #include <iostream> | |
| #include <vector> | |
| #include <assert.h> | |
| int main() | |
| { | |
| std::vector<int> vec_int; | |
| vec_int.push_back(1); |
This file contains hidden or 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
| " | |
| " _ _(_)_ __ ___ _ __ ___ | |
| " / \ / / | '_ ` _ \| '__/ __| | |
| " \ V /| | | | | | | | | (__ | |
| " \_/ |_|_| |_| |_|_| \___| | |
| " | |
| " | |
| " Paul ADENOT -- 2011 | |
| " You need the following plugins : | |
| " DoxygenToolkit indent_guidesm syntasticm |
This file contains hidden or 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
| # A tiny wifi meter | |
| # usage : shoes wifi.rb | |
| Shoes.app(:title => "wifi meter", :width => 250, :height => 100) do | |
| background gradient(rgb(0,0,0), rgb(40,40,40)) | |
| header = { | |
| :font => 'Georgia', | |
| :size => '48px', | |
| :stroke=>'#'+'E'*3, |
This file contains hidden or 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
| ### add_license_block.sh | |
| #! /bin/sh | |
| OWNER="Paul ADENOT \& Martin Richard" | |
| YEAR="2011" | |
| ORGANIZATION="bim" | |
| FILEAUTHOR="Paul ADENOT <[email protected]>" | |
| fill_license_block() |
This file contains hidden or 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
| #!/bin/sh | |
| time=$(zenity --text="On bloque le net combien de temps ?" --scale --value=60 --min-value=1 --max-value=600) | |
| echo $time | |
| network_interface=$(ifconfig | grep Link | tr -s ' ' | cut -d ' ' -f1) | |
| for i in $network_interface | |
| do |
This file contains hidden or 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
| function mozillaSaveFile(filePath,content) | |
| { | |
| if(window.Components) { | |
| try { | |
| netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); | |
| var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile); | |
| file.initWithPath(filePath); | |
| if(!file.exists()) | |
| file.create(0,0664); | |
| var out = Components.classes["@mozilla.org/network/file-output-stream;1"].createInstance(Components.interfaces.nsIFileOutputStream); |
This file contains hidden or 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/zsh -x | |
| mkdir timelapse_frames | |
| cd timelapse_frames | |
| # in seconds | |
| if [ -z $1 ] | |
| then | |
| duration=10 | |
| else | |
| duration=$1 | |
| fi |
This file contains hidden or 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/zsh -x | |
| mkdir timelapse_frames | |
| cd timelapse_frames | |
| # in seconds | |
| if [ -z $1 ] | |
| then | |
| duration=10 | |
| else | |
| duration=$1 | |
| fi |
OlderNewer