Create an empty git repo or reinitialize an existing one
git init
export const fetchAsBlob = url => fetch(url) | |
.then(response => response.blob()); | |
export const convertBlobToBase64 = blob => new Promise((resolve, reject) => { | |
const reader = new FileReader; | |
reader.onerror = reject; | |
reader.onload = () => { | |
resolve(reader.result); | |
}; | |
reader.readAsDataURL(blob); |
{ | |
"name": "user", | |
"plural": "users", | |
"base": "User", | |
"idInjection": true, | |
"options": { | |
"validateUpsert": true | |
}, | |
"properties": {}, | |
"validations": [], |
<div id="demo"> | |
<h1>{{bob.fields.firstName}} {{bob.fields.lastName}}</h1> | |
</div> | |
<ul id="humans-list"> | |
<li v-repeat="humans"> | |
{{fields.firstName}} {{fields.lastName}} | |
</li> | |
</ul> |
/* | |
A set of custom made large numbers for a 16x2 LCD using the | |
LiquidCrystal librabry. Works with displays compatible with the | |
Hitachi HD44780 driver. | |
The Cuicuit: | |
LCD RS pin to D12 | |
LCD Enable pin to D11 | |
LCD D4 pin to D5 | |
LCD D5 pin to D4 |
Create an empty git repo or reinitialize an existing one
git init
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-type" content="text/html; charset=utf-8"> | |
<title>Pinger test</title> | |
<script src="https://code.jquery.com/jquery-3.6.0.min.js" type="text/javascript" charset="utf-8"></script> | |
</head> | |
<body> | |
/* Templates to load: */ | |
function Template(templateUrl) { | |
this.template = false; | |
this.compiledTemplate= false; | |
this.templateUrl = templateUrl; | |
this.draw = function(contents) { | |
//We compile the template if it isn't compiled yet. | |
this.compiledTemplate = this.compiledTemplate || Handlebars.compile(this.template); | |
return this.compiledTemplate(contents); |
ActiveSupport::Inflector.inflections do |inflect| | |
inflect.plural /([aeiou])([A-Z]|_|$)/, '\1s\2' | |
inflect.plural /([rlnd])([A-Z]|_|$)/, '\1es\2' | |
inflect.plural /([aeiou])([A-Z]|_|$)([a-z]+)([rlnd])($)/, '\1s\2\3\4es\5' | |
inflect.plural /([rlnd])([A-Z]|_|$)([a-z]+)([aeiou])($)/, '\1es\2\3\4s\5' | |
inflect.singular /([aeiou])s([A-Z]|_|$)/, '\1\2' | |
inflect.singular /([rlnd])es([A-Z]|_|$)/, '\1\2' | |
inflect.singular /([aeiou])s([A-Z]|_)([a-z]+)([rlnd])es($)/, '\1\2\3\4\5' | |
inflect.singular /([rlnd])es([A-Z]|_)([a-z]+)([aeiou])s($)/, '\1\2\3\4\5' |
from pymt import * | |
import sys, dbus, subprocess, os | |
import time | |
class Tracer(MTWidget): | |
SWIPE_X_THRESHOLD = 220 | |
SWIPE_Y_THRESHOLD = 100 | |
LEFT_SWIPE, RIGHT_SWIPE = range(2) | |
block = False |