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
;see "Counting from 1 to 1,000,000 on the FASTChip" @ c.s.a2 | |
;https://groups.google.com/forum/#!topic/comp.sys.apple2/ibI06hDLiaY | |
;See https://gist.github.com/xk/d2b95a4dcfc6f6fd40310dfeacb257da | |
1000:A0 B0 8C 05 04 8C 04 04 | |
:8C 03 04 8C 02 04 8C 01 | |
:04 8C 00 04 20 90 12 EE | |
:01 04 20 90 12 EE 01 04 | |
:20 90 12 EE 01 04 20 90 |
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 jorge@jorgechamorro.com | |
// 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 jorge@jorgechamorro.com | |
// 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 npm@1.2.14 | |
3 info using node@v0.10.0 | |
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 jorge@jorgechamorro.com | |
// 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 jorge@jorgechamorro.com | |
// 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
/* 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; |
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
javascript:[].filter.call(document.getElementsByClassName("g-clTRght"), function (e) { | |
return /^[0-9]+[hHmMsM]/.test(e.innerHTML); | |
}).forEach(function (e) { | |
var r, h, p, hora, minuto, segundo; | |
var txt= e.innerHTML; | |
if (/^[0-9]+[hH]/.test(txt)) { | |
r= /^([0-9]+)[hH] ([0-9]+)[mM]/.exec(txt); | |
h= new Date(Date.now() + (r[1]*60*60*1000) + (r[2]*60*1000)); | |
} | |
else if (/^[0-9]+[mM]/.test(txt)) { |