Skip to content

Instantly share code, notes, and snippets.

@tomjnsn
tomjnsn / main.dart
Created October 6, 2020 19:40
Sample Flutter Likert
import 'package:flutter/material.dart';
void main() => runApp(MyApp());
/// This is the main application widget.
class MyApp extends StatelessWidget {
static const String _title = 'Flutter Code Sample';
@override
Widget build(BuildContext context) {
Verifying that +tomjensen is my blockchain ID. https://onename.com/tomjensen
@tomjnsn
tomjnsn / main.js
Last active August 29, 2015 14:02
famo.us double origin
require(function(require, exports, module) {
var Engine = require('famous/core/Engine');
var ImageSurface = require('famous/surfaces/ImageSurface');
var mainContext = Engine.createContext();
var img = new ImageSurface({
size: [4877, 3515],
content: 'http://upload.wikimedia.org/wikipedia/commons/4/4e/Pleiades_large.jpg'
});
@tomjnsn
tomjnsn / galleria-video-pause.js
Last active August 25, 2017 23:08
Wire up Galleria to detect YouTube and Vimeo videos playing so it pauses the slideshow while videos are playing.
var autoplayLength = 8000;
var gallery = false;
var ytplayer = false;
$(function() {
if (window.addEventListener) {
window.addEventListener('message', messageReceived, false);
} else {
window.attachEvent('onmessage', messageReceived, false);
}
@tomjnsn
tomjnsn / es.sh
Created August 9, 2012 06:19 — forked from thpoul/es.sh
Install ElasticSearch on Ubuntu 12.04
cd ~
sudo apt-get update
sudo apt-get install openjdk-7-jre -y
wget https://github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.19.8.tar.gz -O elasticsearch.tar.gz
tar -xf elasticsearch.tar.gz
rm elasticsearch.tar.gz
sudo mv elasticsearch-* elasticsearch
sudo mv elasticsearch /usr/local/share