Skip to content

Instantly share code, notes, and snippets.

Avatar

Satoh, Hiroh cho45

View GitHub Profile
View require.rb.diff
diff --git a/deps/mruby-require/mrblib/require.rb b/deps/mruby-require/mrblib/require.rb
index 2a8160b..a0e0291 100644
--- a/deps/mruby-require/mrblib/require.rb
+++ b/deps/mruby-require/mrblib/require.rb
@@ -4,11 +4,11 @@ module Kernel
begin
eval "1", nil
def _eval_load(*args)
- Kernel.eval(*args)
+ eval(*args)
View co2.rb
#!/usr/bin/env ruby
require 'serialport'
class MH_Z19
STARTING_BYTE = 0xff
CMD_GAS_CONCENTRATION = 0x86
CMD_CALIBRATE_ZERO_POINT = 0x87
CMD_CALIBRATE_SPAN_POINT = 0x88
@cho45
cho45 / machinekit.cps
Created Sep 27, 2016
Fusion 360 Custom Post Process Script supporting G64 P (tolerance option) for Machinekit
View machinekit.cps
/**
* Modifled by cho45 for tolerance support
*
*
Original Copyright:
Copyright (C) 2012-2015 by Autodesk, Inc.
All rights reserved.
LinuxCNC (EMC2) post processor configuration.
@cho45
cho45 / a.js
Created Jun 10, 2016
Date.now() vs new Date().getTime()
View a.js
document.body.textContent = new Date().getTime();
View a.js
var string = "";
for (var i = 0; i < 1000; i++) {
string += Math.random().toString(32);
}
@cho45
cho45 / a.js
Last active Jun 9, 2016
get first element
View a.js
document.body.getElementsByTagName("*")[0]
View common.html
<script>
var array = [];
for (var i = 0; i < 1000; i++) {
array[i] = i;
}
</script>
View a.js
var text = document.body.textContent;
View server.js
start_server --port=5001 -- node server.js
You can’t perform that action at this time.