Skip to content

Instantly share code, notes, and snippets.

@minhcasi
minhcasi / index.html
Last active June 29, 2023 22:01 — forked from jcollins-g/index.html
Sunflower
<!-- Copyright 2011 the Dart project authors. All rights reserved.
Use of this source code is governed by a BSD-style license
that can be found in the LICENSE file. -->
<h2>InspireUI Test Dart 12333</h2>
<h2>Dr. Fibonacci's</h2>
<div>
<canvas id="canvas" width="300" height="300"></canvas>
</div>
@minhcasi
minhcasi / AndroidManifest.xml
Last active June 29, 2023 22:02
How to build Flutter Instant app with FluxStore
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:dist="http://schemas.android.com/apk/distribution"
android:targetSandboxVersion="2"
package="com.inspireui.fluxstore">
<!-- The following declaration enables this module to be served instantly -->
<dist:module dist:instant="true"></dist:module>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
@chengkiang
chengkiang / paynow.js
Last active May 7, 2024 08:39
SG PayNow QR Code Generator Sample
String.prototype.padLeft = function (n, str) {
if (n < String(this).length) {
return this.toString();
}
else {
return Array(n - String(this).length + 1).join(str || '0') + this;
}
}
function crc16(s) {
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Node URI Example</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1>QR Code Example</h1>
@echo off
set /p domain="Enter Domain: "
set OPENSSL_CONF=../conf/openssl.cnf
if not exist .\%domain% mkdir .\%domain%
..\bin\openssl req -config cert.conf -new -sha256 -newkey rsa:2048 -nodes -keyout %domain%\server.key -x509 -days 3650 -out %domain%\server.crt
echo.
echo -----
@gbaman
gbaman / HowToOTG.md
Last active June 24, 2024 16:18
Simple guide for setting up OTG modes on the Raspberry Pi Zero

Raspberry Pi Zero OTG Mode

Simple guide for setting up OTG modes on the Raspberry Pi Zero - By Andrew Mulholland (gbaman).

The Raspberry Pi Zero (and model A and A+) support USB On The Go, given the processor is connected directly to the USB port, unlike on the B, B+ or Pi 2 B, which goes via a USB hub.
Because of this, if setup to, the Pi can act as a USB slave instead, providing virtual serial (a terminal), virtual ethernet, virtual mass storage device (pendrive) or even other virtual devices like HID, MIDI, or act as a virtual webcam!
It is important to note that, although the model A and A+ can support being a USB slave, they are missing the ID pin (is tied to ground internally) so are unable to dynamically switch between USB master/slave mode. As such, they default to USB master mode. There is no easy way to change this right now.
It is also important to note, that a USB to UART serial adapter is not needed for any of these guides, as may be documented elsewhere across the int