//encodes special characters | |
function encodeString(str) { | |
return str.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, ''').replace(/\//g, '/').replace(/=/g, '='); | |
} | |
//decodes special characters | |
function decodeString(str) { | |
return str.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"').replace(/'/g, '\'').replace(///g, '/').replace(/=/g, '='); | |
} |
license: gpl-3.0 | |
height: 960 | |
border: no |
### Keybase proof | |
I hereby claim: | |
* I am kustomzone on github. | |
* I am apps (https://keybase.io/apps) on keybase. | |
* I have a public key ASCXVOIzy4D7ijYm4BbYzVG6MT24twsXP2uHtTBuDVwCvwo | |
To claim this, I am signing this object: |
// this is the background code... | |
// listen for our browerAction to be clicked | |
chrome.browserAction.onClicked.addListener(function (tab) { | |
// for the current tab, inject the "inject.js" file & execute it | |
chrome.tabs.executeScript(tab.ib, { | |
file: 'inject.js' | |
}); | |
}); |
This is a SCRIPT-8 cassette.
function[binary_codes,G_vecs] = WTA_kernel_binary(X,G_vecs,G, K) | |
% G is number of permutation vectors | |
% K is the insterest span | |
if size(G_vecs,1) == 0 | |
G_vec = zeros(G,size(X,2)); | |
for i = 1:G | |
G_vecs(i,:) = randperm(size(X,2),size(X,2)); | |
end | |
end |
A couple of weeks ago I played (and finished) A Plague Tale, a game by Asobo Studio. I was really captivated by the game, not only by the beautiful graphics but also by the story and the locations in the game. I decided to investigate a bit about the game tech and I was surprised to see it was developed with a custom engine by a relatively small studio. I know there are some companies using custom engines but it's very difficult to find a detailed market study with that kind of information curated and updated. So this article.
Nowadays lots of companies choose engines like Unreal or Unity for their games (or that's what lot of people think) becaus
HackerNews discussed this with many alternative solutions: https://news.ycombinator.com/item?id=24893615
I already have my own domain name: mydomain.com
. I wanted to be able to run some webapps on my Raspberry Pi 4B running
perpetually at home in headless mode (just needs 5W power and wireless internet). I wanted to be able to access these apps from public Internet. Dynamic DNS wasn't an option because my ISP blocks all incoming traffic. ngrok
would work but the free plan is too restrictive.
I bought a cheap 2GB RAM, 20GB disk VM + a 25GB volume on Hetzner for about 4 EUR/month. Hetzner gave me a static IP for it. I haven't purchased a floating IP yet.
import bytes from '../../vendor/bytes/index.js' | |
const MAX_WIDTH = 600 | |
const MAX_HEIGHT = 600 | |
const { createFFmpeg, fetchFile } = FFmpeg | |
let ffmpeg | |
export async function compressAndGetThumb (file, maxVideoSize, progressCb) { | |
const objectUrl = URL.createObjectURL(file) | |
const videoEl = document.createElement('video') | |
videoEl.addEventListener('error', console.log) |