Skip to content

Instantly share code, notes, and snippets.

@voluntas
voluntas / trello.rst
Last active August 20, 2020 14:55
Trello のススメ
@STAR-ZERO
STAR-ZERO / PostprocessBuildPlayer.rb
Last active February 21, 2020 05:44
UnityのiOSビルド時にローカライズファイルを設定する
#!/usr/bin/env ruby
require 'xcodeproj'
require 'fileutils'
PROJECT = 'Unity-iPhone'
TARGET = 'Unity-iPhone'
LIBRARY = 'Libraries'
LOCALIZE = 'Localize'
@justinfay
justinfay / permutations.js
Last active October 16, 2022 16:15
Python `itertools.permutations` javascript equivalent.
function permutations(array, r) {
// Algorythm copied from Python `itertools.permutations`.
var n = array.length;
if (r === undefined) {
r = n;
}
if (r > n) {
return;
}
var indices = [];
@jhorneman
jhorneman / problems with Flux.md
Last active August 22, 2016 02:18
How to combine the Flux pattern with large hierarchical data

How to combine the Flux pattern with large hierarchical data

I've been converting the web client part of an application I'm developing for a client from plain old JavaScript to React and Flux. (Because this is closed-source client work, I will be a bit vague about what the application is and does.)

Something about my data, my use case, and how I've implemented things, or some combination of those three, doesn't fit the Flux pattern well. So I am writing this to explain my problem and hopefully get some interesting feedback on it. (If you're reading this: thanks.)

The application

I have a Python server which talks to a PostgreSQL database and provides data in JSON format over a REST-ish API (not pure REST, more RPC-style).

@azu
azu / flux-utils.md
Last active August 8, 2018 17:31
flux-utilsについて
@karino2
karino2 / BeamSearch.ipynb
Created March 21, 2017 23:16
Beam Searchについての簡単な説明
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@briancavalier
briancavalier / typescript-strongly-typed-variadic-1.md
Last active October 12, 2023 18:34
A technique for strongly-typed, heterogeneous variadic function types in Typescript

Simpler Variadic Function Types in TypeScript (part 1)

Variadic functions, such as the common zip function on arrays, are convenient and remove the need for lots of specific arity-function variants, e.g., zip2, zip3, zip4, etc. However, they can be difficult and tedious to type correctly in TypeScript when the return type depends on the parameter types, and the parameter types are heterogeneous.

Zip Example

Given a typical zip on arrays:

const a: number[] = [1, 2, 3]