This file contains hidden or 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
| — name: thai-chinese-breakdown | |
| description: Break down Thai text with romanization, Chinese equivalents, English translations, a short memory hint, and a simple beginner example sentence (male speaker default). Use when user pastes Thai text and asks to translate, explain, or break it down with Chinese correlation. — | |
| # Thai-Chinese Breakdown | |
| For learners who know English + Chinese. Show correlations, one memory hint, and one simple example sentence. | |
| Default speaker: male (ครับ if polite). | |
| ## Output |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 <alex@refuel4.com> | |
| * Angular Faq service | |
| * Dependancies: Angular.js, lodash, angular ui bootstrap | |
| */ | |
| class faqService { | |
| constructor($http) { | |
| this.$http = $http; | |
| this.faqList = { |
This file contains hidden or 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 hidden or 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 hidden or 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"; | |
| } | |
| }); |
NewerOlder