This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>My Angular from Scratch</title> | |
<style> | |
.my-component { | |
font-family: Arial, sans-serif; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from apscheduler.schedulers.background import BackgroundScheduler | |
from apscheduler.jobstores.base import JobLookupError | |
from app import write_log | |
from models import Prompt, Image | |
import random | |
from flask import Flask | |
import openai | |
import models | |
from datetime import datetime | |
import requests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# synthio_midi_synth.py - pretty usable MIDI-controlled synth using synthio in CircuitPython | |
# 11 May 2023 - @todbot / Tod Kurt | |
# Uses cheapie PCM5102 DAC on QTPY RP2040 | |
# Video demo: https://www.youtube.com/watch?v=N-PbbWWDE6k | |
# Features: | |
# - midi velocity controls attack rate (gentle press = slow, hard press = fast) | |
# - notes have small random detune on all oscillators to reduce phase stacking | |
# - adjustable number of detuned oscillators per note 1-5 (midi controller 83) | |
# - five selectable waveforms: saw, squ, sin, noisy sin, noise (midi controller 82) | |
# - vibrato depth on mod wheel (midi controller 1) |
go run /usr/local/share/llhlstools/ll-hls-origin-example.go -dir /Library/WebServer/Documents -http :8000
- Navigate to a repo where you have your Jekyll static site (maybe your GitHub pages site)
- Launch Codespaces (Code button -> Cloud -> New codespace on current branch)
- Once it's launched, run the following in the terminal
gem install bundler jekyll
bundle update
bundle exec jekyll serve
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Will successfully install amdgpu drivers and rocm, | |
## but pointless as there is no gpu device attached to WSL2 (only CUDA and DirectML is supported, not /dev/kfd or amd gpus) | |
## ROCM/HIP | |
sudo apt update | |
sudo apt dist-upgrade | |
sudo apt install libnuma-dev | |
wget -q -O - http://repo.radeon.com/rocm/rocm.gpg.key | sudo apt-key add - | |
echo 'deb [arch=amd64] http://repo.radeon.com/rocm/apt/debian/ xenial main' | sudo tee /etc/apt/sources.list.d/rocm.list |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Since mopsled didn't renew their domain, this is from their original blogpost which was a useful reference: | |
https://web.archive.org/web/20180220190550/http://www.mopsled.com/2015/run-nodejs-on-nearlyfreespeechnet/ | |
NearlyFreeSpeech.net (NFSN) is a very inexpensive web host, DNS provider and domain registrar. NFSN added support in 2014 for NodeJS, Django, and tons of other languages through persistent processes. This guide, based on the Django tutorial provided by NFSN, will demonstrate the setup I used for creating a node.js daemon. | |
NFSN Configuration | |
If you’re creating a new website, select the Custom domain type: | |
Choose custom domain option for new site |
For a while, JSX
and new es6 syntax had flaky support in emacs, but there's been huge work on a lot of packages. Using emacs for JavaScript with React, ES6, and Flow (or Typescript, etc) is really easy and powerful in Emacs these days.
This is how you can work on modern web development projects with full support for tooling like JSX, Flow types, live eslint errors, automatic prettier.js formatting, and more.
Set up web-mode
web-mode
provides most of the underlying functionality, so a huge shout-out to the maintainer(s) there.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
export class StateDispatcher extends React.Component { | |
constructor(props) { | |
super(props); | |
this.state = props.state || {}; | |
this._dispatch = this.dispatch.bind(this); | |
} | |
dispatch(action) { |
NewerOlder