This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { useState, createContext, useEffect, useCallback } from "react"; | |
export const GapiClientContext = createContext(); | |
const GAPI_CONFIG = { | |
apiKey: process.env.NEXT_PUBLIC_FIREBASE_CONFIG_apiKey, | |
clientId: process.env.GOOGLE_ID, | |
scope: "https://www.googleapis.com/auth/gmail.send", | |
discoveryDocs: ["https://www.googleapis.com/discovery/v1/apis/gmail/v1/rest"], | |
fetch_basic_profile: true, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// to run | |
// ./download-from-csv.js csvfile.csv | |
// will download anything in the csv file under the col: | |
const colName = 'URL' | |
const fileDir = 'output_files' // to this subdirectory of the current dir | |
const csv = require('csvtojson') | |
const fs = require('fs') | |
const path = require('path') | |
const https = require('https') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if customer and customer.tags contains 'admin' %} | |
<div class="adminArea"> | |
<h2>Admin only</h2> | |
<p class="adminCTA"><a href="/admin/collections/{{collection.id}}" target="_blank">Edit Collection</a></p> | |
</div> | |
{% endif %} | |
{% if customer and customer.tags contains 'admin' %} | |
<div class="adminArea"> | |
<h2>Admin only</h2> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { connect } from 'react-redux' | |
import moment from 'moment' | |
import { | |
Container, Content, Text, Button, DatePicker, Title | |
} from 'native-base'; | |
class Example extends React.Component { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { connect } from 'react-redux' | |
import moment from 'moment' | |
import { | |
Container, Content, Text, Button, DatePicker, Title | |
} from 'native-base'; | |
class Example extends React.Component { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @author Alex Miller <[email protected]> | |
* Angular Faq service | |
* Dependancies: Angular.js, lodash, angular ui bootstrap | |
*/ | |
class faqService { | |
constructor($http) { | |
this.$http = $http; | |
this.faqList = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="mcnTextContent"> | |
<table border="0" cellpadding="20" cellspacing="0" width="600" id="emailContainer"> | |
<tr> | |
<td align="center" valign="top"> | |
{{#if images}} | |
{{#each images}} | |
<img style="max-width: 360px; margin: 0 auto;" src="{{this}}"/> | |
<br/> | |
{{/each}} | |
{{/if}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var request = require('request-promise'); | |
request('http://127.0.0.1:4040/api/tunnels') | |
.then( function(res){ | |
var tunnels = JSON.parse(res).tunnels; | |
for(var i in tunnels){ | |
console.log( 'setting NGROK_HOST_'+i+'=' + tunnels[i].public_url); | |
process.env['NGROK_HOST_'+i] = tunnels[i].public_url; | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Service: | |
UserService.getUser = function(){ | |
return $http( { method: 'GET', url: '/users/me', cache : true } ) | |
.success(function(results, status){ | |
if( (status!= 200) || (typeof(results) == "undefined") ){ | |
alert('logged out!'); | |
location.href = "/index.html"; | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Track.js - tracking scripts by alex miller | |
// | |
// | |
config = {}; | |
config.track = true;// set to true in production, false in dev env | |
config.dump = true;// set to false in production env, true in dev | |
config.mixpanel = true; // <%= TRACKS_CONFIG['mixpanel'] %>; // set to true in production env, false in dev | |
config.googleAnaltyics = true; |