Skip to content

Instantly share code, notes, and snippets.

View oidoug's full-sized avatar

Douglas Schmidt oidoug

View GitHub Profile
@oidoug
oidoug / yarn-sync.js
Created June 24, 2021 12:31 — forked from bartvanandel/yarn-sync.js
Sync versions from yarn.lock back into package.json
const fs = require("fs");
/**
* Removes matching outer quotes from a string.
*
* @param {string} text - String to unquote
* @returns {string} - Unquoted string
*/
const unquote = text => /(["'])?(.*)\1/.exec(text)[2];
@oidoug
oidoug / webview-onscroll.patch
Created January 12, 2018 14:16 — forked from birkir/webview-onscroll.patch
react native WebView onScroll patch
From 12d5a33175038d872d9d6ca8acb00e57f99202c7 Mon Sep 17 00:00:00 2001
From: Birkir Gudjonsson <birkir.gudjonsson@gmail.com>
Date: Wed, 26 Jul 2017 11:53:42 -0400
Subject: [PATCH] Added onScroll
---
Libraries/Components/WebView/WebView.ios.js | 11 +++++++++++
React/Views/RCTWebView.m | 29 +++++++++++++++++++++++++++++
React/Views/RCTWebViewManager.m | 1 +
3 files changed, 41 insertions(+)
@oidoug
oidoug / robot.js
Created December 5, 2012 18:49 — forked from gabriel-almeida/robot.js
seeker
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot){
robot.clone();
robot.turn(45);
this.offset = 1;
};
Robot.prototype.onIdle = function(ev) {
@oidoug
oidoug / robot.js
Created December 5, 2012 16:25 — forked from cgardner/robot.js
derp
var Robot = function(robot){
robot.turnLeft(robot.angle % 90);
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
if (robot.parentId) {
robot.ahead(1);
robot.turnGunRight(1);
}
else {
@oidoug
oidoug / robot.js
Created December 5, 2012 16:21 — forked from Shipow/robot.js
TestBed1
var Robot = function(robot) {
robot.rotateCannon(-90);
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead();
//i'll add a clone but i need to refactor collision
//robot.clone();
};
@oidoug
oidoug / robot.js
Created December 5, 2012 16:13 — forked from Shipow/robot.js
TestBed0
var Robot = function(robot) {
robot.rotateCannon(-90);
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead();
//i'll add a clone but i need to refactor collision
//robot.clone();
};