Skip to content

Instantly share code, notes, and snippets.

View truongsinh's full-sized avatar
:octocat:
Blessed

TruongSinh Tran-Nguyen truongsinh

:octocat:
Blessed
View GitHub Profile
@truongsinh
truongsinh / 01-my.html
Last active August 29, 2015 14:23
./path/to/my.html
<!-- ./path/to/my.html -->
<div>
"SmarpShare"
<span>is<span>
awesome, dud'
</div>
@truongsinh
truongsinh / my-component-name.ts
Created June 24, 2015 05:36
./path/my-component-name.ts
// ./path/my-component-name.ts
import tpl from './my-component-name.html';
angular
.module("myComponentName")
.directive("myComponentName", function() {
return
{
restrict: 'E',
template: tpl,
controller: myComponentNameCtrl,
gulp.task('ng-template-watch', function () {
gulp
.src('path/**/*.html')
.pipe(through2.obj(function(file, _, cb){
file.path += ".ts";
var prefix = 'var t =';
var suffix = ';\nexport default t;\n';
var newC = prefix + JSON.stringify(file.contents.toString()) + suffix;
file.contents = new Buffer(newC);
this.push(file);
@truongsinh
truongsinh / my-component-name.html
Created June 24, 2015 05:41
// ./path/my-component-name.html
<!-- ./path/my-component-name.html -->
<div>
"SmarpShare"
<span>is<span>
awesome, dud'
</div>
before_script:
- export GOPATH=$(pwd)
stages:
- build
- test
- deploy
validate-schema:
image: truongsinh/pg-client:9.4
@truongsinh
truongsinh / CLA
Created April 5, 2018 10:41
Smarp CLA
Thank you for your interest in Smarp (the "Company"). In order to clarify the intellectual property license granted with Contributions from any person or entity, the Company must have a Contributor License Agreement ("CLA") on file that has been signed by each Contributor, indicating agreement to the license terms below. This license is for your protection as a Contributor as well as the protection of the Company and its users; it does not change your rights to use your own Contributions for any other purpose.
You accept and agree to the following terms and conditions for Your present and future Contributions submitted to the Company. In return, the Company shall not use Your Contributions in a way that is contrary to the public benefit or inconsistent with its bylaws in effect at the time of the Contribution. Except for the license granted herein to the Company and recipients of software distributed by the Company, You reserve all right, title, and interest in and to Your Contributions.
1. Definitions.
#!/usr/bin/env node
const dest = __dirname + "/../packages/";
const { readdir, readFile, writeFile } = require("fs");
const { promisify } = require("util");
const [readDirAsync, writeFileAsync, readFileAsync] = [
promisify(readdir),
promisify(writeFile),
promisify(readFile)
];
#!/usr/bin/env node
const dest = __dirname + "/../packages/";
const { readdir, writeFile, exists, mkdir } = require("fs");
const { promisify } = require("util");
const [readDirAsync, writeFileAsync, existsAsync, mkdirAsync] = [
promisify(readdir),
promisify(writeFile),
promisify(exists),
promisify(mkdir)
#!/usr/bin/env node
const dest = __dirname + "/../packages/";
const { readdir, writeFile, exists, mkdir } = require("fs");
const { promisify } = require("util");
const [readDirAsync, writeFileAsync, existsAsync, mkdirAsync] = [
promisify(readdir),
promisify(writeFile),
promisify(exists),
promisify(mkdir)
@truongsinh
truongsinh / platform-channel-type.tsv
Last active May 15, 2019 00:41
Flutter Platform Channels with Protobuf
Dart, Android iOS
null null nil (NSNull when nested)
bool java.lang.Boolean NSNumber numberWithBool:
int java.lang.Integer NSNumber numberWithInt:
int, if 32 bits not enough java.lang.Long NSNumber numberWithLong:
double java.lang.Double NSNumber numberWithDouble:
String java.lang.String NSString
Uint8List byte[] FlutterStandardTypedData typedDataWithBytes:
Int32List int[] FlutterStandardTypedData typedDataWithInt32:
Int64List long[] FlutterStandardTypedData typedDataWithInt64: