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
// 2017-04-30 [email protected] | |
// See http://www.eevblog.com/forum/projects/in-search-of-a-supercomputer | |
#include <pthread.h> | |
#include <stdlib.h> | |
#define BUF_SIZE 96*1024*1024 | |
pthread_t t1, t2, t3, t4, t5, t6, t7, t8; | |
double* nu_buffer () { return (double*) malloc(BUF_SIZE); } |
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
// 2017-04-30 [email protected] | |
// See http://www.eevblog.com/forum/projects/in-search-of-a-supercomputer | |
#include <pthread.h> | |
#include <stdlib.h> | |
#define BUF_SIZE 16*1024*1024 | |
pthread_t t1, t2, t3, t4; | |
double* nu_buffer () { return (double*) malloc(BUF_SIZE); } |
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
sleep 1 | |
# Apagar/parar cosas: | |
/etc/init.d/framework stop | |
/etc/init.d/powerd stop | |
/etc/init.d/pmond stop | |
killall webreader | |
# killall browserd NO VA NO SE POR QUÉ | |
killall browserd | |
killall tmd |
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 | |
# The IP for the server you wish to ping | |
SERVER=192.168.100.1 | |
sleep 30s | |
while [ 1 ]; do | |
# Only send two pings, sending output to /dev/null | |
ping -c2 ${SERVER} > /dev/null | |
# If the return code from ping ($?) is not 0 (meaning there was an error) |
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
root@opi1:~# cat npm-debug.log | |
0 info it worked if it ends with ok | |
1 verbose cli [ '/root/.nvm/v0.10.0/bin/node', | |
1 verbose cli '/root/.nvm/v0.10.0/bin/npm', | |
1 verbose cli 'install', | |
1 verbose cli 'node-gyp', | |
1 verbose cli '-g' ] | |
2 info using [email protected] | |
3 info using [email protected] | |
4 verbose read json /root/.nvm/v0.10.0/lib/package.json |
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
// 2016-12-10 [email protected] | |
// node.js timers are borken: node checktimers.js errs all the time | |
// But this won't ever err in a browser: copy-paste in any browser's console | |
// Update: somewhere between node 0.10.26 and 0.12.0 this has been fixed | |
(function (ctr,flag,errors) { | |
function _1 () { flag= 0 } | |
function _2 () { errors+= flag } | |
function _3 () { flag= 1 } |
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
// 2016-11-29 [email protected] | |
// JavaScript execution wow and flutter | |
var MAX_ms= -1; | |
var r, now, ctr, str; | |
var MAX_ctr= -1; | |
var MIN_ctr= 10e9; | |
function sync (now,r) { | |
now= Date.now()+ 1; |
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 buscarVariablesGlobales (dirtySet, cleanSet) { | |
//© 2013-02-19 [email protected] | |
dirtySet= document.body.appendChild(document.createElement('iframe')); | |
cleanSet= Object.getOwnPropertyNames(dirtySet.contentWindow); | |
dirtySet.parentNode.removeChild(dirtySet); | |
dirtySet= Object.getOwnPropertyNames(function () { return this }()); | |
return dirtySet.filter(function (v,i,o) { return cleanSet.indexOf(v) < 0 }); | |
})() |
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
/*! | |
multiline | |
Multiline strings in JavaScript | |
https://github.com/sindresorhus/multiline | |
by Sindre Sorhus | |
MIT License | |
*/ | |
(function () { | |
'use strict'; |
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
/* gcc -std=c99 -o brightness brightness.c -framework IOKit -framework ApplicationServices */ | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <IOKit/graphics/IOGraphicsLib.h> | |
#include <ApplicationServices/ApplicationServices.h> | |
const int kMaxDisplays = 16; | |
const CFStringRef kDisplayBrightness = CFSTR(kIODisplayBrightnessKey); | |
const char *APP_NAME; |