Skip to content

Instantly share code, notes, and snippets.

View jywarren's full-sized avatar

Jeffrey Warren jywarren

View GitHub Profile
def decir
3.veces hace
pon "hola mundo!"
fin
(1..3).cada hace |unidad|
fin
// autotranslated
ويقول تعريف
3 مرات فعل
يضع "مرحبا العالم"
نهاية
(1 .. 3) كل عمل | وحدة |
نهاية
@jywarren
jywarren / ThermalFlashlightCommonCathode.ino
Created February 12, 2012 02:06
Common-cathode variant of Thermal Flashlight code
// See http://bildr.org/2011/02/mlx90614-arduino/ for i2c library and instructions
// You must download the "twimaster.cpp" and "i2cmaster.h" files, and place them in a folder called "I2Cmaster". This must be placed in a folder called "libraries" which in turn should be placed in your Sketchbook folder (see Arduino's Preferences menu item to see where this is on your machine.).
// Typically, once you install these files, you must relaunch Arduino.
// The extra files are included in this Gist, as well as attached to the page http://publiclaboratory.org/tool/thermal-camera
#include <i2cmaster.h>
#include "Wire.h"
//#include "BlinkM_funcs.h"
@jywarren
jywarren / xorg.conf
Created April 30, 2012 14:23
xorg.conf on problematic Asus EEE 1005HA w/ Ubuntu
Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "Files"
ModulePath "/usr/lib/xorg/modules"
FontPath "/usr/share/fonts/X11/misc"
@jywarren
jywarren / Xorg.0.log
Created April 30, 2012 14:34
Xorg log excerpt related to new modelines in xorg.conf
[ 21.840] (II) intel(0): Not using default mode "960x540" (doublescan mode not supported)
[ 21.840] (II) intel(0): Not using default mode "960x600" (doublescan mode not supported)
[ 21.840] (II) intel(0): Printing probed modes for output LVDS1
[ 21.840] (II) intel(0): Modeline "1024x600"x60.0 48.96 1024 1064 1168 1312 600 617 620 622 -hsync +vsync (37.3 kHz)
[ 21.840] (II) intel(0): Modeline "1024x768"x60.0 65.00 1024 1048 1184 1344 768 771 777 806 -hsync -vsync (48.4 kHz)
[ 21.840] (II) intel(0): Modeline "800x600"x60.3 40.00 800 840 968 1056 600 601 605 628 +hsync +vsync (37.9 kHz)
[ 21.840] (II) intel(0): Modeline "800x600"x56.2 36.00 800 824 896 1024 600 601 603 625 +hsync +vsync (35.2 kHz)
[ 21.841] (II) intel(0): Modeline "640x480"x59.9 25.18 640 656 752 800 480 490 492 525 -hsync -vsync (31.5 kHz)
[ 21.882] (II) intel(0): EDID for output VGA1
[ 21.882] (II) intel(0): Output LVDS1 connected
@jywarren
jywarren / ddcprobe.txt
Created April 30, 2012 14:35
output of "sudo ddcprobe"
vbe: VESA 3.0 detected.
oem: Intel(r)PineView Graphics Chip Accelerated VGA BIOS
vendor: Intel Corporation
product: Intel(r)PineView Graphics Controller Hardware Version 0.0
memory: 8128kb
mode: 1280x1024x256
mode: 1280x1024x64k
mode: 1280x1024x16m
mode: 1024x768x256
mode: 1024x768x64k
@jywarren
jywarren / get-edid.txt
Created April 30, 2012 14:52
get-edid output for an edidfail issue on ubuntu
get-edid: get-edid version 2.0.0
Performing real mode VBE call
Interrupt 0x10 ax=0x4f00 bx=0x0 cx=0x0
Function supported
Call successful
VBE version 300
VBE string at 0x2110 "Intel(r)PineView Graphics Chip Accelerated VGA BIOS"
@jywarren
jywarren / sw-save-offline.js
Created October 14, 2012 16:17
SpectralWorkbench.org macro: Save offline
setup: function() {
// code to run on startup
$W.add_button("My Button",function(){
window.open($W.canvas.toDataURL(),'_newtab').focus() // this may not work if popups are blocked
})
},
draw: function() {
// code to run every frame
}
@jywarren
jywarren / error.txt
Created December 6, 2012 04:39
mysql error on plots site
Warning: Lost connection to MySQL server during query query: INSERT INTO watchdog (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (0, 'php', '%message in %file on line %line.', 'a:4:{s:6:\"%error\";s:12:\"user warning\";s:8:\"%message\";s:421:\"Query execution was interrupted\nquery: SELECT n.nid, n.type, n.language, n.uid, n.status, n.created, n.changed, n.comment, n.promote, n.moderate, n.sticky, n.tnid, n.translate, r.vid, r.uid AS revision_uid, r.title, r.body, r.teaser, r.log, r.timestamp AS revision_timestamp, r.format, u.name, u.picture, u.data FROM node n INNER JOIN users u ON u.uid = n.uid INNER JOIN node_revisions r ON r.vid = n.vid WHERE n.nid = 22\";s:5:\"%file\";s:69:\"/home/warren/sites/publiclaboratory.org/html/modules/node/node.module\";s:5:\"%line\";i:755;}', 3, '', 'http://publiclaboratory.org/wiki/balloon-mapping-materials' in /home/warren/sites/publiclaboratory.org/html/includes/database.mysql.inc on line 128 Warning: MySQL server has gone awa
@jywarren
jywarren / periodic.js
Last active April 13, 2016 21:14
A SpectralWorkbench macro to periodically submit spectral data on a timer
setup: function() {
// code to run on startup
$W.timer = {}
$W.timer.title = prompt('Please provide a title for the spectra you will be capturing. They will also be numbered sequentially.')
$W.timer.number = 0
$W.timer.interval = 60*60 // seconds until next capture: 60 * 60 is one hour
// run this every hour:
$W.timer.capture = function() {
$W.timer.number += 1
if ($W.calibration_id) {