Skip to content

Instantly share code, notes, and snippets.

View FaisalAbid's full-sized avatar

Faisal Abid FaisalAbid

View GitHub Profile
FROM google/dart
WORKDIR /app
ADD pubspec.* /app/
RUN pub get
ADD . /app
RUN pub get --offline
CMD []
@FaisalAbid
FaisalAbid / gist:8c90cd2ae3e3dd20a4ab
Last active August 29, 2015 14:18
Keep your dart server running via an isolate
import 'dart:io';
import 'dart:isolate';
void main(List<String> args) {
var sPort = new ReceivePort();
spawnIsolate(sPort.sendPort);
sPort.listen((message) {
if (message == null) {
spawnIsolate(sPort.sendPort);
@FaisalAbid
FaisalAbid / gist:7152929335631ecf647d
Created March 25, 2015 02:15
Dart RPC Cool with Async
@ApiMethod(path:'login', method:'POST')
Future<AccountResponse> login(AccountRequest request) async{
AccountResponse accountResponse = new AccountResponse();
Authentication auth = new Authentication();
var result = await auth.login(request.email, request.password);
accountResponse.response = result;

Keybase proof

I hereby claim:

  • I am FaisalAbid on github.
  • I am faisalabid (https://keybase.io/faisalabid) on keybase.
  • I have a public key whose fingerprint is 5F8E B347 0CC5 B202 C729 230C 966B DD7B DA4A 6C76

To claim this, I am signing this object:

Faisals-MacBook-Pro:MobileLearningLabs FaisalAbid$ node -v
v0.8.16
Faisals-MacBook-Pro:MobileLearningLabs FaisalAbid$ jitsu deploy -debug
info: Welcome to Nodejitsu faisalabid
info: jitsu v0.11.4, node v0.8.16
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
warn:
warn: The package.json file is missing required fields:
warn:
Retina:client FaisalAbid$ jitsu deploy
info: Welcome to Nodejitsu faisalabid
info: jitsu v0.11.1, node v0.8.6
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Analyzing application dependencies in node server.js
warn: Local package version appears to be old
warn: The package.json version will be incremented automatically
warn: About to write /Users/FaisalAbid/Dropbox/Development/dynamatik/workspace/EcardsFromUs/client/package.json
data:
LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
LOCAL_SRC_FILES := \
src/dec/alpha.c \
src/dec/buffer.c \
src/dec/frame.c \
src/dec/idec.c \
src/dec/io.c \
src/dec/layer.c \
@FaisalAbid
FaisalAbid / phantomjs_facebook.js
Created October 4, 2012 19:17 — forked from ecin/phantomjs_facebook.js
Log into Facebook with phantomJS
console.log("got here");
var page = require('webpage').create();
page.onConsoleMessage = function(msg) {
console.log(msg);
};
page.open("http://facebook.com", function(status) {
if ( status === "success" ) {