Skip to content

Instantly share code, notes, and snippets.

View matthijskooijman's full-sized avatar

Matthijs Kooijman matthijskooijman

View GitHub Profile
server {
listen 80;
listen [::]:80;
server_name www.by-brenda.nl by-brenda.nl;
# Enable PHP
include enable-php;
matthijs@grubby:~/oscar/suikerbot/OSCAR/engine$ ./start
PowerWorker <PowerWorker(Thread-1, started 139819982911232)>: starting...
dmx_usb.__init__: ERROR: Could not open /dev/dmx
DMX driver: connecting...
DMX driver: ENTTEC USB PRO, starting...
ERROR: 'pydmx' object has no attribute 'ser'
[OSCAR INFO 12:59:43 tid=139819949565696] server started on 127.0.0.1:12121
[OSCAR INFO 13:00:02 tid=139819949565696] accepted 127.0.0.1:60659
[OSCAR INFO 13:00:02 tid=139819957958400] welcome 127.0.0.1:60659
TEXT
using UnityEngine;
using UnityEngine.SceneManagement;
using System.Collections;
public class SceneLoader {
static object sceneParam = null;
static Scene loadedScene;
public static T GetSceneParam<T>() where T : class {
return sceneParam as T;
Arduino.h:
#define digitalPinToPort(P) digitalPinToPortFunction(pin);
static inline uint8_t digitalPinToPortFunction(uint8_t pin) __attribute__((always_inline));
static inline uint8_t digitalPinToPortFunction(uint8_t pin) {
#if !defined(ARDUINO_MAIN)
if __builtin_constant_p(pin)
return digital_pin_to_port[P];
else
#endif
return pgm_read_byte( digital_pin_to_port_PGM + pin );
( pcb2gcode 1.2.2 )
( Software-independent Gcode )
G94 ( Millimeters per minute feed rate. )
G21 ( Units == Millimeters. )
G90 ( Absolute coordinates. )
S0 ( RPM spindle speed. )
G64 P0.05080 ( set maximum deviation from commanded toolpath )
F500.00000 ( Feedrate. )
G04 #@! TF.FileFunction,Copper,L2,Bot,Signal*
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 4.0.0-rc1-stable) date Wed 04 Nov 2015 12:32:50 PM CET*
%MOMM*%
G01*
G04 APERTURE LIST*
%ADD10C,0.100000*%
%ADD11O,1.524000X2.540000*%
%ADD12C,3.937000*%
4,5c4,5
< Timing cached reads: 1696 MB in 2.00 seconds = 847.70 MB/sec
< Timing buffered disk reads: 218 MB in 3.00 seconds = 72.61 MB/sec
---
> Timing cached reads: 1664 MB in 2.00 seconds = 831.84 MB/sec
> Timing buffered disk reads: 490 MB in 3.00 seconds = 163.06 MB/sec
9c9
< 134217728 bytes (134 MB) copied, 1.20088 s, 112 MB/s
---
> 134217728 bytes (134 MB) copied, 0.513574 s, 261 MB/s
@matthijskooijman
matthijskooijman / Test.java
Created December 10, 2015 09:23
Testcase for java keybinding / keyboard layout problem
import javax.swing.*;
import java.awt.event.*;
import java.awt.*;
class Item extends JMenuItem {
public void addNotify() {
System.out.println("Add\n");
}
public Item(String s) { super(s); }
}
G04 #@! TF.FileFunction,Copper,L2,Bot,Signal*
%FSLAX46Y46*%
G04 Gerber Fmt 4.6, Leading zero omitted, Abs format (unit mm)*
G04 Created by KiCad (PCBNEW 4.0.0-2.201511301921+6191~38~ubuntu15.04.1-stable) date Sun 06 Dec 2015 10:32:44 PM CET*
%MOMM*%
G01*
G04 APERTURE LIST*
%ADD10C,0.150000*%
%ADD11R,2.235200X2.235200*%
G04 APERTURE END LIST*
( pcb2gcode 1.2.2 )
( Software-independent Gcode )
G94 ( Millimeters per minute feed rate. )
G21 ( Units == Millimeters. )
G90 ( Absolute coordinates. )
S0 ( RPM spindle speed. )
G64 P0.05080 ( set maximum deviation from commanded toolpath )
F500.00000 ( Feedrate. )