Skip to content

Instantly share code, notes, and snippets.

package com.example.ekene.cloudinarsample;
import android.util.Log;
import com.cloudinary.android.signed.Signature;
import com.cloudinary.android.signed.SignatureProvider;
import org.json.JSONException;
import org.json.JSONObject;
@siddharthkp
siddharthkp / reactivconf-2017-proposal.md
Last active February 25, 2024 10:06
Building applications for the next billion users
@lenaten
lenaten / gist:96f7102c92b3a7d59a50
Last active December 6, 2017 10:59
Hosting React app in s3 with CloudFront
- create s3 bucket, for example: react.
- create cloudfront distributions with these settings:
- Default Root Object: index.html
- Origin Domain Name: s3 bucket url, for example: react.s3.amazonaws.com
- add custom error page with these settings:
- HTTP Error Code: 403: Forbidden
- Customize Error Response: Yes
- Response Page Path: /index.html
- HTTP Response Code: 200: OK
@sebmarkbage
sebmarkbage / Enhance.js
Last active January 31, 2024 18:33
Higher-order Components
import { Component } from "React";
export var Enhance = ComposedComponent => class extends Component {
constructor() {
this.state = { data: null };
}
componentDidMount() {
this.setState({ data: 'Hello' });
}
render() {
@ianbarber
ianbarber / RetrieveAccessTokenActivity.java
Created March 17, 2014 20:22
A quick example of retrieving an access token with GoogleAuthUtil
package com.google.devrel.samples.gmstest.app;
import android.app.Activity;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
@bigcalm
bigcalm / fail_demo.html.twig
Created February 6, 2013 14:38
Using Symfony2, DQL and knplabs/knp-paginator-bundle - how to get around "Cannot count query which selects two FROM components, cannot make distinction"
<ul>
{% for project in pagination %}
<li>{{ project.name }} has {{ project.?? }} tasks</li>
{% endfor %}
</ul>
@pitch-gist
pitch-gist / gist:2999707
Created June 26, 2012 22:21
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>