Skip to content

Instantly share code, notes, and snippets.

View andrewvmail's full-sized avatar

momoterraw andrewvmail

View GitHub Profile
@andrewvmail
andrewvmail / linode-terraform.md
Last active June 9, 2018 21:38
Gist of getting linode terraform working
@andrewvmail
andrewvmail / cordova-ionic-prod-with-tsx.md
Created July 18, 2018 06:53
FIX: cordova ionic run browser --prod does not work with tsx
@andrewvmail
andrewvmail / wallaby.js
Created August 19, 2018 23:56 — forked from yleflour/wallaby.js
Wallaby + React Native
/*
WallabyJS React Native Config
Works well with Jest + Enzyme
*/
/* eslint-disable */
module.exports = function (wallaby) {
return {
files: [
'src/**/*.js',
@andrewvmail
andrewvmail / WebRTCBuildGuide.md
Created September 4, 2018 04:29 — forked from szktty/WebRTCBuildGuide.md
詳解 WebRTC ビルド

詳解 WebRTC ビルド

以下の内容は M63 時点の情報です。

WebRTC ライブラリのソースコードはサイズが 6GB 以上あってダウンロード時間でペヤングが 100 個は食べられるほどで、ビルドするにも Mac Pro の 12 コアをフル回転させて 1 つのアーキテクチャにつき最低 15 分はかかります。その上ビルドは相当に複雑な構成をしており、全地球のプログラマの寿命を戦闘機のカタパルトで助走をつけて殴っていいレベルで削らせるブラックなボックスです。あまりに自力ビルドの難易度が高いので WebRTC Build Scripts というビルドスクリプトも登場しましたが、最近ビルド方法が大きく変更されたために残念ながらこのビルドツールの内容は古くなってしまいました。

幸い iOS では公式ビルドのバイナリをダウンロードできるようになりました。 ところが「これで iOS はすべて解決!」とも言えません。 WebRTC のビルドには様々なオプションが用意されており、公式ビルドはあくまで特定のオプションの組み合わせの一つです。残念なことに用途によっては公式ビルドでカバーできない場合もあり、気軽に依存できない状況もあると思います。 時雨堂の WebRTC SFU Sora とかそうです (宣伝)。

この記事の目的は、ビルドの各手順の意味を把握してもらうことです(理解とは言ってない)。おそらく自力ビルドせざるを得ない人はほとんどいないと思いますが、万が一の場合に参考になれば幸いです。

@andrewvmail
andrewvmail / decimalize_git_hash.bash
Created October 15, 2018 03:53 — forked from hborders/decimalize_git_hash.bash
Print the given git hash + a prepended "1" in decimal form
#!/bin/bash -euo pipefail
if [ ${#} -eq 0 ]
then
# read from STDIN
MAYBE_GIT_HASH=$( cat )
else
MAYBE_GIT_HASH="${1}"
fi
@andrewvmail
andrewvmail / perf-snippet.js
Created October 18, 2018 21:20
performance snippets
let toggle = false
const attachHandler = () =>
document
.getElementById("message-composer-input")
.addEventListener("change", function() {
if(!toggle) {
@andrewvmail
andrewvmail / setup-drachtio-coturn-setup.sh
Created October 19, 2018 06:41
setup-test-drachtio-simple-registrar
# digitalocean, sfo1, ipv6, with monitoring
# no AAAA record setup or ipv4/ipv6 dual stack carrier doesnt work for some reason (coturn)
# setup AAA point it to the ip
#prep
apt-get update
apt-get install git vim make gcc libssl-dev autoconf automake zlib1g-dev libtool-bin g++ libcurl4-openssl-dev
curl -sL https://deb.nodesource.com/setup_8.x | sudo bash -
sudo apt install nodejs
@andrewvmail
andrewvmail / setup-drachtio-coturn-setup.sh
Last active October 19, 2018 07:05
setup-test-drachtio-simple-registrar
# digitalocean, sfo1, ipv6, with monitoring
# no AAAA record setup or ipv4/ipv6 dual stack carrier doesnt work for some reason (coturn)
# setup AAA point it to the ip
#prep
apt-get update
apt-get install git vim make gcc libssl-dev autoconf automake zlib1g-dev libtool-bin g++ libcurl4-openssl-dev
curl -sL https://deb.nodesource.com/setup_8.x | sudo bash -
sudo apt install nodejs
@andrewvmail
andrewvmail / fix-sticker-with-image-magick.sh
Last active October 23, 2018 23:51
Fix stickers with ImageMagick
find . -name '*.preview.png' -exec mogrify -trim +repage -resize '120x120>' -gravity center -background transparent -extent 120x120 {} +
find . -name '*.png' -exec mogrify -trim +repage -resize '340x340>' -gravity center -background transparent -extent 340x340 {} +
import * as React from "react";
import { state, signal } from "cerebral/tags";
import { connect } from "@cerebral/react";
const Carret = () => <span className="blinking-cursor">|</span>
let observer // <---- THIS