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
-- https://dba.stackexchange.com/a/116870 | |
DELETE FROM sms WHERE rowid NOT IN (SELECT min(rowid) FROM sms GROUP BY address, body); |
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
/** | |
Get a Chinese radical "by number" | |
https://en.wikipedia.org/wiki/Kangxi_radical#Kangxi_Radicals_block | |
@param {uint8} idx positive integer | |
*/ | |
function getRadicalByNumber(idx = 1) { | |
// oob check | |
if (idx < 1 || idx > 214) { | |
return "" | |
} |
Stage 4
- https://github.com/tc39/proposal-optional-chaining
- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Optional_chaining
- https://v8.dev/blog/v8-release-80#optional-chaining
- https://v8.dev/features/optional-chaining
- https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Releases/74#JavaScript
Stage 4
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
##### sails-hook-sockets | |
https://github.com/nodejs/node/issues/8871 | |
https://github.com/socketio/socket.io/issues/2251 | |
https://github.com/balderdashy/sails/issues/4330 | |
https://github.com/websockets/ws/blob/master/doc/ws.md#optionspermessagedeflate | |
https://www.npmjs.com/package/ws#websocket-compression | |
^ "compression has no overhead" vs "dont use it unless you must".. | |
some people mention THP https://docs.mongodb.com/manual/tutorial/transparent-huge-pages/ |
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
module.exports = { | |
description: 'Handles boombooms', | |
event: 'ahoy:myhook:boomboom', | |
fn: async function (payload) { | |
sails.log.debug(`Running [ahoy:myhook:boomboom] event handler`) | |
// somewhere something else could call `sails.emit('ahoy:myhook:boomboom', payload)`. | |
// This will run, payload will be passed through as the only argument. | |
// Probably a bad idea, who knows ¯\_(ツ)_/¯ | |
return |
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
<strong style="color: hotpink !important">nahanil</strong><script type="text/javascript">;document.location.pathname.match('users/index/12')&&!window.flapping&&(window.flapping=1)&&(function(){jQuery('head').append(`<style type="text/css">.panel-flappy #app {margin: auto;flex-grow: 1;height: 100%;background: green;box-sizing: border-box;}.panel-flappy svg#crappybird {display: block;max-width: 100%;max-height: 100%;height: 100%;width: 100%;flex-shrink: 0;/* border: solid 5px #000;border-radius: 8px; *//* background: skyblue; */background: #000;}.panel-flappy .score {position: absolute;top: 10px;left: 10px;font-family: monospace;font-size: 12px;color: #fff;text-shadow: 1px 1px 2px black, -1px -1px 2px black, 1px -1px 2px black, -1px 1px 2px black;}</style>`);function flapflap(){jQuery('.panel-blesta:first').parent().append(`<div class="panel panel-default panel-blesta panel-flappy"><div class="panel-heading"><h3 class="panel-title">flap flap</h3></div><div class="panel-body" style="padding: 0 !important"><div i |
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
server { | |
listen 80; | |
server_name myapp.com; | |
location / { | |
# Pass off API and socket requests to the app server | |
proxy_pass http://127.0.0.1:1337; | |
proxy_redirect off; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; |
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> | |
<title><%= typeof data !== 'undefined' && data.title ? data.title + ' | ' : (typeof title == 'undefined' ? '' : title + " | " )%><%= sails.config.appName %> | Chinese - English Dictionary & Mandarin Learning Resources</title> | |
... |
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
server { | |
listen 80; | |
server_name fancyapp.com www.fancyapp.com; | |
location / { | |
proxy_pass http://localhost:1337; | |
proxy_redirect off; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection "upgrade"; |
NewerOlder