Skip to content

Instantly share code, notes, and snippets.

@applideveloper
applideveloper / JavaScriptGenerator.java
Created January 22, 2017 04:55 — forked from anonymous/JavaScriptGenerator.java
JavaScript generator for nub.
package com.github.kmizu.nub;
import java.util.*;
public class JavaScriptGenerator implements AstNode.ExpressionVisitor<Object> {
private Set<String> functions = new HashSet<>();
private StringBuilder stringBuilder = new StringBuilder();

macOS 10.12 Sierra Setup

Custom recipe to get macOS 10.12 Sierra running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.11 El Capitan setup recipe and 10.10 Yosemite setup recipe. I am currently tweaking this for 10.12 Sierra and expect to refine this gist over the next few weeks.

I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. I generally reinstall each computer from scratch every 6 months, and I do not perform upgrades between releases.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your o

#Phoenix 1.1.x to 1.2.0 Upgrade Instructions

Project Generator

To generate new projects as 1.2.0, install the new mix archive:

mix archive.install https://github.com/phoenixframework/archives/raw/master/phoenix_new.ez

Deps

@applideveloper
applideveloper / hotcode.ex
Created July 14, 2016 06:46 — forked from mgwidmann/hotcode.ex
Hot code swapping
# To show hot code uploading, we first need to build a simple phoenix project so we can see it happen in real time.
# Start by making a new phoenix project
$ mix phoenix.new hotcode
# Go into the directory
$ cd hotcode
# Add exrm dependency to mix.exs file
{:exrm, "~> 1.0.3"}
@applideveloper
applideveloper / file0.erl
Created June 30, 2016 16:55 — forked from sile/file0.erl
ホットコードローディング時のプロセスクラッシュについて ref: http://qiita.com/sile/items/697f80db992819056127
-module(hoge).
-export([gen_external_fun/0, gen_local_fun/0, gen_anonymouns_fun/0]).
-export([hello/0]).
gen_external_fun() -> % 公開関数への参照を返す
fun hoge:hello/0. % これだけが完全修飾形式での参照 (= 複数回のコードローディングを跨いでも安全)
gen_local_fun() -> % ローカル関数への参照を返す
fun hello/0.
@applideveloper
applideveloper / erlang_web.rst
Created June 15, 2016 02:30 — forked from voluntas/erlang_web.rst
Erlang/OTP で WebApp の開発に必要な N 個のこと

Erlang/OTP で WebApp の開発に必要な N 個のこと

元ネタ

http://d.hatena.ne.jp/gfx/20130909/1378741015

あるプログラミング言語で実際にWebAppを開発できるようになるまで、何が必要だろうか。言語仕様の習得は終えているとしよう。おそらく、最低限以下のような知識が必要だと思われる。とりあえず Erlang/OTP について知っていることを書いた。

ただし、HTML 生成をするならそもそも Erlang/OTP を選択するのは正しい選択では無い。 あくまで API サーバを作るという前提であるべきだ。

@applideveloper
applideveloper / webrtc_sfu_dev.rst
Created May 23, 2016 12:42 — forked from voluntas/webrtc_sfu_dev.rst
WebRTC SFU コトハジメ
@applideveloper
applideveloper / webrtc_sfu_develop.rst
Created May 23, 2016 12:42 — forked from voluntas/webrtc_sfu_develop.rst
WebRTC SFU をフルスクラッチで作ってみた

WebRTC SFU をフルスクラッチで作ってみた

I wrote a WebRTC SFU from scratch

Author

@voluntas

Translator

@alanmshelly

Version

0.0.0

url

https://voluntas.github.io/

@applideveloper
applideveloper / shiguredo_webrtc_sfu_log.rst
Created May 23, 2016 12:39 — forked from voluntas/shiguredo_webrtc_sfu_log.rst
時雨堂 WebRTC SFU Sora 開発ログ
@applideveloper
applideveloper / 1_.md
Created March 30, 2016 04:52 — forked from gakuzzzz/1_.md
Scala の省略ルール早覚え

Scala の省略ルール早覚え

このルールさえ押さえておけば、読んでいるコードが省略記法を使っていてもほぼ読めるようになります。

メソッド定義

def concatAsString(a: Int, b: Int): String = {
  val a_ = a.toString();
  val b_ = b.toString();