A interactive & generative site with canvas-sketch and Tone.js.
Live Demo:
struct ContentView: View { | |
var body: some View { | |
VStack { | |
HStack { | |
Spacer() | |
Button { } label: { | |
Image(systemName: "power") | |
.resizable() | |
.aspectRatio(contentMode: .fill) | |
.padding() |
const matcapTexture = new THREE.TextureLoader().load(matcap); | |
const material = new THREE.MeshMatcapMaterial({ | |
color: 0xFFFFFF, | |
matcap: matcapTexture | |
}); | |
const uniforms = { | |
uTime: { value: 0 } | |
}; |
import { Yieldable } from 'ember-concurrency'; | |
import fetch from 'fetch'; // i.e. ember-fetch. could also use native fetch too. | |
class FetchYieldable extends Yieldable { | |
constructor(url, opts = {}) { | |
super(...arguments); | |
this.url = url; | |
this.opts = opts; | |
} |
// | |
// Circles of dots. | |
// Created using Processing 3.5.3. | |
// | |
// Code by @marcedwards from @bjango. | |
// | |
// A GIF of this code can be seen here: | |
// https://twitter.com/marcedwards/status/1144236924095234053 | |
// |
// app/adapters/application.js | |
import DS from 'ember-data'; | |
import { inject as service } from '@ember-decorators/service'; | |
const { RESTAdapter } = DS; | |
export default class ApplicationAdapter extends RESTAdapter { | |
@service fastboot; | |
@service shoebox; |
A interactive & generative site with canvas-sketch and Tone.js.
Live Demo:
# Original source: https://gist.github.com/hopsoft/56ba6f55fe48ad7f8b90 | |
# Merged with: https://gist.github.com/kofronpi/37130f5ed670465b1fe2d170f754f8c6 | |
# Benefits of: https://gist.github.com/e12e/e0c7d2cc1d30d18c8050b309a43450ac | |
# And fixes of: https://gist.github.com/joelvh/f50b8462611573cf9015e17d491a8a92 | |
namespace :db do | |
desc 'Dumps the database to backups' | |
task dump: :environment do | |
dump_fmt = ensure_format(ENV['format']) | |
dump_sfx = suffix_for_format(dump_fmt) | |
backup_dir = backup_directory(Rails.env, create: true) |
import { inject as service } from '@ember/service'; | |
import Route from '@ember/routing/route'; | |
const DEFAULT_INACTIVITY_TIMEOUT_MS = 10 * 60 * 1000 | |
export default Route.extend({ | |
session: service(), | |
userActivity: service(), | |
notifications: service(), | |
logoutTimeoutSubscription: null, | |
activate() { |
<path to chrome>/chrome.exe --remote-debugging-port=9222
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --remote-debugging-port=9222
google-chrome --remote-debugging-port=9222