Skip to content

Instantly share code, notes, and snippets.

@poshaughnessy
poshaughnessy / jsonmodelviewer.html
Created April 21, 2012 23:52
Three.js JSONLoader GL_INVALID_OPERATION errors - use with http://dl.dropbox.com/u/37726670/monster-decimated.js
<!doctype html>
<html lang="en">
<head>
<title>Three.js JSON model viewer</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<style>
body {
font-family: Monospace;
background-color: #ccc;
function sync(queue) {
// do some async operation
}
function syncFail(failedEvents, queue) {
failedEvents.forEach(e => queue.enqueue(e));
queue.set([...failedEvents, queue]);
}
@poshaughnessy
poshaughnessy / app.js
Created January 31, 2012 09:28
Simple static site on Heroku with Node.js
var express = require('express');
var port = process.env.PORT || 3000;
var app = express.createServer();
app.get('/', function(request, response) {
response.sendfile(__dirname + '/index.html');
}).configure(function() {
app.use('/images', express.static(__dirname + '/images'));
}).listen(port);
@poshaughnessy
poshaughnessy / 01-load-page.py
Created September 12, 2018 08:40
Samsung Internet WebDriver ChromeDriver example
# Basic example of running Samsung Internet v8.x using ChromeDriver v2.36
import time
from selenium import webdriver
options = webdriver.ChromeOptions()
# NB. when v8 stable is released you can use with 'com.sec.android.app.sbrowser'
options.add_experimental_option('androidPackage', 'com.sec.android.app.sbrowser.beta')
options.add_experimental_option('androidActivity', 'com.sec.android.app.sbrowser.SBrowserMainActivity')
options.add_experimental_option('androidDeviceSocket', 'Terrace_devtools_remote')
// Load the prediction model
mobilenet.load().then(model => {
// Now we can keep checking the camera feed at regular intervals, like this:
model.classify(video).then(predictions => {
const topResult = predictions[0];
if (topResult.className === 'llama') {
// Woo! Llama! NB. We can also get the confidence value from the `probability`
@poshaughnessy
poshaughnessy / samsung-internet-versions-rough-guide.md
Last active October 5, 2020 12:53
Rough browser version guide for Samsung Internet

v1.x (v1.0: Chromium 18, v1.5 & v1.6: Chromium 28)

v1 logo

Originally based on the stock Android browser (AOSP), 2012.

"It was around early 2013 when we made [the decision to move to Chromium]. We shipped our first Chromium-based browser in one of the Galaxy S4 models released later in 2013." (Source)

  • v1.0 preloaded in Galaxy S4
  • v1.5 preloaded in Galaxy Note 3