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
#include <sys/types.h> | |
#include <sys/stat.h> | |
#include <fcntl.h> | |
#include <stdio.h> | |
int main() | |
{ | |
int i = 0; | |
while (i < 66000) { | |
int fd = open("file.txt", O_RDONLY); |
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
producteevApp.dateHelper = function (date, region, timezoneOffset) | |
{ | |
//For timezone handling, check: http://stackoverflow.com/questions/10438579/getting-moment-js-to-show-datetimes-appropriate-to-info-being-viewed | |
//TODO: test this function for cross browser compatibility | |
//example : moment("2013-01-15T06:34:09+0000"); | |
var momentInstance = moment(date); | |
momentInstance = (momentInstance && momentInstance.isValid()) ? momentInstance : moment(); //valid date || now() | |
if (_.isUndefined(timezoneOffset)) { | |
throw ("timezoneOffset not defined"); | |
} |
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
function runx (func, n, wait, args) | |
{ | |
var count = 0; | |
var f = function() | |
{ | |
if (count < n) | |
{ | |
func.apply(this, args); | |
setTimeout(f, wait); |
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
#!/bin/bash | |
# You can synchronize the configuration of multiple servers using git and this very small script. | |
# Just add your servers in a file called "serverlist.txt" (one per line) and | |
# configure git on the $REMOTE_DIRECTORY_CONFIG. Personnaly, I use the root of the server (/) | |
# You can also use git hook post-update to run a command after the update | |
# of the config files if you wish. | |
SERVERS_FILE="serverlist.txt" | |
REMOTE_DIRECTORY_CONFIG="/" |
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
if (!all_list) | |
{ | |
var all_list = []; | |
} | |
var pattern_search = '.fsl.fwb.fcb a'; | |
var current_list = []; | |
var links = $$(pattern_search); | |
var value; | |
var i = 0; | |
while (i < links.length) |