Skip to content

Instantly share code, notes, and snippets.


Jacopo Colò jacopocolo

View GitHub Profile
jacopocolo / arena-random-image-widget.js
Last active Nov 20, 2020
Scriptable widget that load a random image from an channel
View arena-random-image-widget.js
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: black; icon-glyph: user-md;
// just replace the url below with the url if the channel you want to use
// image channels only, doesnt supoort text or anything else
const channel = ''
const url = ''+channel.substring(channel.lastIndexOf('/') + 1)+'/contents';
const req = new Request(url)
View THREE.MeshLine.js
import * as THREE from "";
function MeshLine() {
this.positions = [];
this.previous = []; = [];
this.side = [];
this.width = [];
jacopocolo /
Last active Dec 17, 2020
Making a Bitsy game compatible with the Nintendo 3ds browser

The Nintendo 3ds browser is capable of running Bitsy games! And it's a delightful Bitsy machine.

To make games compatible, we just need to teach the 3ds browser to speak the language Bitsy is written in: modern Javascript!

To do that we need two things:

  1. The html page that contains your game
  2. A <script> </script> html element we'll add at the top of the page that translates modern Javascript to somewhat Javascript.

The whole script element is here. Just select the whole thing and copy.

jacopocolo / script.html
Created Apr 25, 2020
Polyfill functions to make Bitsy 7.0 and below work on a Nintendo 3ds browser
View script.html
<script type="text/javascript">
//assign polyfill
if (!Object.assign) {
Object.defineProperty(Object, 'assign', {
enumerable: false,
configurable: true,
writable: true,
value: function(target, firstSource) {
'use strict';
if (target === undefined || target === null) {
View tquery-bundle.js
This file has been truncated, but you can view the full file.
// tquery.js - - MIT License
// vim: ts=4 sts=4 sw=4 expandtab
// -- kriskowal Kris Kowal Copyright (C) 2009-2011 MIT License
// -- tlrobinson Tom Robinson Copyright (C) 2009-2010 MIT License (Narwhal Project)
// -- dantman Daniel Friesen Copyright (C) 2010 XXX TODO License or CLA
// -- fschaefer Florian Schäfer Copyright (C) 2010 MIT License
// -- Gozala Irakli Gozalishvili Copyright (C) 2010 MIT License
// -- kitcambridge Kit Cambridge Copyright (C) 2011 MIT License
// -- kossnocorp Sasha Koss XXX TODO License or CLA
jacopocolo /
Created Apr 14, 2019 full screen block editor CSS hack
.BlockLightboxMetadataPane__Dialog-zcu36p-0 {
max-width: none !important;
max-height: none !important;
width: 100% !important;
height: 100% !important;
.dznTKy > label:first-child {
flex-basis: 5% !important;
View printSwatches.js
// let's get a hold on the Sketch API
const sketch = require('sketch');
//let's expose these globally
var document = sketch.fromNative(context.document);
var page = document.selectedPage;
var Rectangle = require('sketch/dom').Rectangle;
var Shape = require('sketch/dom').Shape;
var Style = require('sketch/dom').Style;
var Group = require('sketch/dom').Group;
jacopocolo / Webview screensavers url
Created Nov 8, 2018
A couple of cool urls you can set as screensaver
View Webview screensavers url
Earth from space
View Simple-fetch.jsx
import * as React from "react";
import Avatar from "@collab-ui/react/lib/Avatar";
import "@collab-ui/core/css/collab-ui.min.css";
import "@collab-ui/icons/css/collab-ui-icons.css";
import { PropertyControls, ControlType, Data } from "framer";
const style: React.CSSProperties = {
margin: "0 0 20px 20px",
objectFit: "cover"
jacopocolo /
Last active Sep 24, 2018
How to add collab-ui react to Framer X

Quick guide on how to get started with Framer X and the collab-ui components

This guide assumes that you have yarn and a code editor installed on your computer (Visual Studio Code is the recommended one for Framer X, use that). If you don't, get installing:

One you are done:

  1. Create a new project in Framer X

  2. Save it