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
<p><b>Inbox Name is:</b> {% inbox.name %}</p> | |
<p><b>Previous messages:</b></p> | |
{% for chat_message in conversation.recent_messages %} | |
<div> | |
<h4 style="margin: 0;"> | |
{% if chat_message.sender == user.available_name %} | |
You | |
{% else %} |
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 disable on mobile phone */ | |
@media screen and (max-width: 576px) { | |
.woot-widget-bubble { | |
display: none | |
} | |
} | |
/* To disable on iPad/other tablets */ | |
@media screen and (max-width: 992px) { |
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
// datasetConfig | |
{ | |
dataset | |
scope | |
key | |
appSort | |
appFilters | |
url | |
parentId | |
viewId |
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
const template = require('./template.json'); | |
class TemplateGenerator { | |
constructor(template, prefix = '') { | |
if (!template) { | |
throw new Error('Template is required'); | |
} | |
this.prefix = prefix; | |
this.template = template; |
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
sudo: required | |
dist: trusty | |
language: node_js | |
node_js: | |
- "6.9.0" | |
python: | |
- "3.5" | |
cache: | |
- pip | |
- yarn |
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
const parseErrorCode = (error) => { | |
if (error.response) { | |
if (error.response.status === 401) { | |
// If auth failed | |
} else if (error.response.status === 500) { | |
// If server failed | |
} else if (error.response.status === 422) { | |
// If request params are errored |
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
function escapeCharAndroid(url, body) { | |
return fetch(url, { // Use your url here | |
method: 'POST', | |
headers: { | |
'Accept': 'application/json', | |
'Content-Type': 'application/json', | |
}, | |
body: JSON.stringify(body) | |
}) | |
.then(response => response.text()) // Convert to text instead of res.json() |
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
function escapeCharAndroid(promise) { | |
return promise.then(response => response.text()) | |
.then((text) => { | |
if (Platform.OS === 'android') { | |
text = text.replace(/\r?\n/g, '').replace(/[\u0080-\uFFFF]/g, ''); | |
} | |
return text; | |
}) | |
.then(response => JSON.parse(response)); | |
} |
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
version: '2' | |
services: | |
web: | |
build: ./app/ | |
volumes: | |
- ./app:/app | |
- /app/node_modules | |
ports: | |
- "1337:1337" |
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
FROM node:argon | |
# Install Sails globally | |
RUN npm install -g sails | |
# Create app directory | |
RUN mkdir -p /app | |
# Change Work directory to app | |
WORKDIR /app |