Skip to content

Instantly share code, notes, and snippets.

View EugeneLiang's full-sized avatar
🎯
Focusing

Eugene Liang EugeneLiang

🎯
Focusing
View GitHub Profile
@codediodeio
codediodeio / index.js
Created September 13, 2017 00:21
Integrate Twilio with Firebase Cloud Functions
const functions = require('firebase-functions');
const admin = require('firebase-admin');
admin.initializeApp(functions.config().firebase);
const twilio = require('twilio');
const accountSid = functions.config().twilio.sid
const authToken = functions.config().twilio.token
const client = new twilio(accountSid, authToken);
@582033
582033 / ofo.php
Last active May 25, 2018 14:54
ofo订单
<?php
class ofo {
public function __construct($carno, $coord_url, $token){
list($this->lat, $this->lng) = $this->get_coord($coord_url);
$this->carno = $carno;
$this->token = $token;
}
//把高德url转换为坐标
@delemach
delemach / slackNotify.js
Last active November 1, 2018 18:41 — forked from turret-io/slackNotify.js
Parse SNS notification from Elastic Beanstalk and publish to Slack channel
var http = require('https');
var querystring = require('querystring');
// set the post request options
var reqOptions = {
hostname: 'hooks.slack.com',
port: 443,
path: '/services/YOUR/SLACK/HOOK_HERE',
method: 'POST'
};
@stevebowman
stevebowman / AWSLambdaSimpleSMS.js
Last active June 22, 2023 12:09
AWS Lambda Function to send an SMS message via the Twilio API
console.log('Loading event');
// Twilio Credentials
var accountSid = '';
var authToken = '';
var fromNumber = '';
var https = require('https');
var queryString = require('querystring');

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).

@nackjicholson
nackjicholson / angular-phonegap-seed.md
Created December 22, 2014 05:35
AngularJS, Phonegap, and Angular Seed. Let's Go!

I have been wanting to learn how to write a mobile app with Phonegap for, well...since I first heard there was such an incredible thing as Phonegap. The very idea that it could make a Objective-C ignorant (but js ambitious) developer like myself, able to take his satisfactory JS/HTML/CSS code and transform it into a satisfactory mobile experience. Yay, Phonegap. But, you probably aren't here because you don't know what Phonegap is, you're probably here because you want to put the oh-so-interesting angularjs framework onto a phone and do incredible things. Well, so did I. I found great tutorials, the best of which is definitely this 4-part delight by [@markcoleman][1].

[Phonegap and Angularjs the Start][2]

I would've been lost without it. However, after I completed it I wanted to build my own app, and I was looking for a place to start. In my exploratory phase with angular, I had discovered the [angular-seed][3] project and [angular-phonecat][4] tutorial. I knew angular-seed would start me out with runnable

@derekconjar
derekconjar / wordpress-firebase.php
Last active April 25, 2024 15:21
An example of using Firebase and WordPress together. The idea is to use WP's custom post types and metaboxes to make content management easy, and sync with Firebase so that your websites have access to a real-time JSON feed of your custom data.
<?php
/**
* All custom functions should be defined in this class
* and tied to WP hooks/filters w/in the constructor method
*/
class Custom_Functions {
// Custom metaboxes and fields configuration
@pk11
pk11 / reactjs.js
Last active August 29, 2016 17:42
/** @jsx React.DOM */
/**
* Our component structure will look like the following:
* - WikiBox
* -- AutoCompleteBox
* --- AutoComplete
*/
// this component renders a single entity coming from wikipedia
@carolineschnapp
carolineschnapp / gist:5397337
Last active January 20, 2023 10:11
Sample JavaScript file added with ScriptTag resource. This sample file is meant to teach best practices. Your app will load jQuery if it's not defined. Your app will load jQuery if jQuery is defined but is too old, e.g. < 1.7.
/* Sample JavaScript file added with ScriptTag resource.
This sample file is meant to teach best practices.
Your app will load jQuery if it's not defined.
Your app will load jQuery if jQuery is defined but is too old, e.g. < 1.7.
Your app does not change the definition of $ or jQuery outside the app.
Example: if a Shopify theme uses jQuery 1.4.2, both of these statements run in the console will still return '1.4.2'
once the app is installed, even if the app uses jQuery 1.9.1:
jQuery.fn.jquery => "1.4.2"
$.fn.jquery -> "1.4.2"
*/
@brysgo
brysgo / ndb_json.py
Created January 6, 2012 21:47
(THIS IS REALLY OLD AND OUTDATED) A port of the app engine json serializer for NDB.
# Copyright 2008 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,