https://github.com/mohanson/gameboy - gameboy emulator
https://github.com/JakeStanger/mpd-discord-rpc - discordrpc for mpd
https://github.com/spieglt/nestur - nes emulator
https://github.com/cristicbz/rust-doom - doom renderer
https://github.com/Aloxaf/silicon - a tool for creating pretty images of your source code for sharing
https://github.com/Rigellute/spotify-tui - a tui for spotify
https://github.com/atanunq/viu - view images in the terminal
%GetOptimizationStatus return a set of bitwise flags instead of a single value,
to access the value, you need to take the binary representation of the returned value.
Now, for example, if 65 is returned, the binary representation is the following:
(65).toString(2).padStart(12, '0');
// 000001000001Each binary digit acts as a boolean with the following meaning:
| <?php | |
| /* | |
| Identify existing meetings/meeting IDs on Zoom.us call app | |
| License: Public domain. Use for pranking only. Any other use prohibited. | |
| https://gist.github.com/nekromoff/48ec26cbaecc31fccb202d1efa7d0657 | |
| */ | |
| $ch = curl_init(); |
| export const h=(t,p,...c)=>({t,p,c,k:p&&p.key}) | |
| export const render=(e,d,t=d.t||(d.t={}),p,r,c)=> | |
| // arrays | |
| e.pop?e.map((e,p)=>render(e,d,t.o&&t.o[p])): | |
| // components | |
| e.t.call?(e.i=render((render.c=e).t({children:e.c,...e.p},e.s=t.s||{},t=> | |
| render(Object.assign(e.s,t)&&e,d,e)),t.i||d,t&&t.i||{}),e):( | |
| // create notes | |
| e.d=t.d||(e.t?document.createElement(e.t):new Text(e.p)), | |
| // diff props |
| const { createServer } = require('http'); | |
| createServer((req, res) => { | |
| res.writeHead(200, { | |
| Connection: 'Transfer-Encoding', | |
| 'Content-Type': 'text/html; charset=utf-8', | |
| 'Transfer-Encoding': 'chunked' | |
| }); | |
| res.write(` |
I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.
I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.
Chrome 51 has some pretty wild behaviour related to console.log in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.
| /* eslint-disable no-param-reassign */ | |
| const path = require('path'); | |
| const fse = require('fs-extra'); | |
| class LoadablePlugin { | |
| constructor({ filename = 'loadable-stats.json', writeToFileEmit = false } = {}) { | |
| this.opts = { filename, writeToFileEmit }; | |
| } | |
| apply(compiler) { |
| function logger(strings,...values) { | |
| var str = ""; | |
| for (let i = 0; i < strings.length; i++) { | |
| if (i > 0) { | |
| if (values[i-1] && typeof values[i-1] == "object") { | |
| if (values[i-1] instanceof Error) { | |
| if (values[i-1].stack) { | |
| str += values[i-1].stack; | |
| continue; | |
| } |
| AWS region code | AWS region name | Number of AZs | AZ names |
|---|---|---|---|
| us-east-1 | Virginia | 4 | us-east-1a, us-east-1b, us-east-1c, us-east-1e |
| us-west-1 | N. California | 2 | us-west-1a, us-west-1b |
| us-west-2 | Oregon | 3 | us-west-2a, us-west-2b, us-west-2c |
| eu-west-1 | Ireland | 3 | eu-west-1a, eu-west-1b, eu-west-1c |
| eu-central-1 | Frankfurt | 2 | eu-central-1a, eu-central-1b |
| ap-southeast-1 | Singapore | 2 | ap-southeast-1a, ap-southeast-1b |
| ap-southeast-2 | Sydney | 2 | ap-southeast-2a, ap-southeast-2b, ap-southeast-2c |
| ap-northeast-1 | Tokyo | 2 | ap-northeast-1a, ap-nort |
| addEventListener('fetch', event => { | |
| event.respondWith(fetchAndCheckPassword(event.request)) | |
| }) | |
| async function fetchAndCheckPassword(req) { | |
| if (req.method == "POST") { | |
| try { | |
| const post = await req.formData(); | |
| const pwd = post.get('password') | |
| const enc = new TextEncoder("utf-8").encode(pwd) |