Skip to content

Instantly share code, notes, and snippets.

View alvinlai's full-sized avatar

Alvin Lai alvinlai

  • Mountain View, CA
View GitHub Profile
import Html exposing (span)
import Html.Attributes exposing (property)
import Json.Encode exposing (string)
main = span [ property "innerHTML" <| string "x &times; y"] []
@bkaradzic
bkaradzic / orthodoxc++.md
Last active May 14, 2025 23:21
Orthodox C++

Orthodox C++

What is Orthodox C++?

Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.

Why not Modern C++?

@arkilis
arkilis / afnetworking3.m
Last active March 18, 2020 13:46
Afnetworking 3 example and usage
// GET
NSURL *URL = [NSURL URLWithString:@"http://example.com/resources/123.json"];
AFHTTPSessionManager *manager = [AFHTTPSessionManager manager];
[manager GET:URL.absoluteString
parameters:nil
progress:nil
success:^(NSURLSessionTask *task, id responseObject) {
NSLog(@"JSON: %@", responseObject);
}
failure:^(NSURLSessionTask *operation, NSError *error) {
@theoretick
theoretick / exrm-conform-notes.md
Last active December 24, 2016 17:30
Notes on deploying elixir, erlang, and OTP apps with exrm and conform

#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

@lattner
lattner / TaskConcurrencyManifesto.md
Last active May 11, 2025 07:07
Swift Concurrency Manifesto
@evancz
evancz / data-interchange.md
Last active December 31, 2024 01:04
Why do I have to write JSON decoders in Elm?

A vision for data interchange in Elm

How do you send information between clients and servers? What format should that information be in? What happens when the server changes the format, but the client has not been updated yet? What happens when the server changes the format, but the database cannot be updated?

These are difficult questions. It is not just about picking a format, but rather picking a format that can evolve as your application evolves.

Literature Review

By now there are many approaches to communicating between client and server. These approaches tend to be known within specific companies and language communities, but the techniques do not cross borders. I will outline JSON, ProtoBuf, and GraphQL here so we can learn from them all.

@holzschu
holzschu / LLVM_for_iOS.sh
Last active December 19, 2024 20:17
Cross-compiling LLVM for iOS
#! /bin/bash
curl http://releases.llvm.org/6.0.0/llvm-6.0.0.src.tar.xz -O
tar xvzf llvm-6.0.0.src.tar.xz
rm llvm-6.0.0.src.tar.xz
cd llvm-6.0.0.src
# get clang
pushd tools
curl http://releases.llvm.org/6.0.0/cfe-6.0.0.src.tar.xz -O