Skip to content

Instantly share code, notes, and snippets.

View zigen's full-sized avatar
🏠
Working from home

Kentaro "zigen" Teramoto zigen

🏠
Working from home
View GitHub Profile
@zigen
zigen / group.rb
Created September 16, 2015 09:26
class Array
def group p
arr = self
res = []
start = 0
last = 0
while start + p <= arr.length
last = start + p -1
res.push(arr[start..last])
start = last + 1
i=0
result = []
while nil != buf = gets
arr = []
arr = buf.split(" ").collect do |s| s.to_i end
result.push arr
end
print result
@zigen
zigen / nq.rb
Created September 16, 2015 14:21
#!/Users/hrl7/.rbenv/shims/ruby
def solve
puts "Solver Start"
board = [
[1, 0, 0, 0, 0, 0, 0, 0],
[1, 0, 0, 0, 0, 0, 0, 0],
[1, 0, 0, 0, 0, 0, 0, 0],
[1, 0, 0, 0, 0, 0, 0, 0],
[1, 0, 0, 0, 0, 0, 0, 0],
@zigen
zigen / react-native-maps+0.20.1.patch
Last active March 21, 2018 23:25
how to solve module become undefined bug in react-native@0.54.0 and react-native-maps@0.20.1
patch-package
--- a/node_modules/react-native-maps/index.js
+++ b/node_modules/react-native-maps/index.js
@@ -1,4 +1,4 @@
-import MapView from './lib/components/MapView';
+import MapView from './lib/components/MapView';
export { default as Marker } from './lib/components/MapMarker.js';
export { default as Polyline } from './lib/components/MapPolyline.js';
@@ -9,7 +9,9 @@ export { default as LocalTile } from './lib/components/MapLocalTile.js';

Keybase proof

I hereby claim:

  • I am zigen on github.
  • I am zigen (https://keybase.io/zigen) on keybase.
  • I have a public key ASBIfT0-iHH059k1q6RjK9qX0XKE-g_snyTbAVHoGsMOzQo

To claim this, I am signing this object: