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 { createAction } from 'redux-actions'; | |
export const DOWNLOAD_FILE = 'DOWNLOAD_FILE'; | |
export const downloadFile = createAction(DOWNLOAD_FILE); | |
export const DOWNLOAD_FILE_FAILURE = 'DOWNLOAD_FILE_FAILURE'; | |
export const downloadFileFailure = createAction(DOWNLOAD_FILE_FAILURE); | |
export const DOWNLOAD_FILE_REQUESTED = 'DOWNLOAD_FILE_REQUESTED'; | |
export const downloadFileRequested = createAction(DOWNLOAD_FILE_REQUESTED); |
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
-------------------------------------- SERVER SETUP STEPS ------------------------------------------------------- | |
******************************* DEPENDENCIES INSTALLATION ******************************* | |
1. Check ubuntu version using command, lsb_release -a | |
2. Install apache according to ubuntu version | |
3. apt-get update | |
4. apt-get install apache2 | |
5. INSTALL NVM FROM HERE---------------- https://gist.github.com/d2s/372b5943bce17b964a79 | |
6. Install Node - nvm install v8.9.0 or higher | |
7. Install MongoDB - https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/ |
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
export const apps = { | |
"whatsapp": {pkgName: "com.whatsapp", urlScheme: "whatsapp", urlParams: "app"}, // fa | |
"facebook": {pkgName: "com.facebook.katana", urlScheme: "fb", urlParams: "requests"}, // fa: facebook-official | |
"facebook messenger": {pkgName: "com.facebook.orca", urlScheme: "fb-messenger", urlParams: "user-thread/{user-id}"}, // fa: facebook | |
"skype": {pkgName: "com.skype.raider", urlScheme: "skype", urlParams: "echo123?call"}, // fa | |
"wechat": {pkgName: "com.tencent.mm", urlScheme: "weixin", urlParams: "dl/chat"}, // fa | |
"snapchat": {pkgName: "com.snapchat.android", urlScheme: "snapchat", urlParams: "?u=foo"}, // fa | |
"twitter": {pkgName: "com.twitter.android", urlScheme: "twitter", urlParams: "messages"}, // fa | |
"youtube": {pkgName: "com.google.android.youtube", urlScheme: "youtube", urlParams: "watch?v=dQw4w9WgXcQ"}, // fa | |
"netflix": {pkgName: "com.netflix.mediaclient", urlScheme: "nflx", urlParams: ""}, |
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 moment from 'moment'; | |
import cloneDeep from 'lodash/cloneDeep'; | |
import querystring from 'querystring'; | |
const calendarDateFormat = 'YYYY-MM-DD HH:mm:ss'; | |
const displayDateFormat = 'DD-MM-YYYY hh:mm A'; | |
const createEvents = (event, query) => { | |
let events = []; |
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 [ -f ~/.bash_profile ] | |
then | |
echo bash profile exists | |
else | |
echo bash profile does not exists | |
fi |
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
recordiOSSimulator() { | |
echo -n "Started iOS simulator recording"; | |
echo -n "Use CTRL+C to stop recording"; | |
xcrun simctl io booted recordVideo "$1"; | |
} |
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 _ from 'lodash'; | |
const keysTo = (keys) => { | |
if (Array.isArray(keys)) { | |
return keys.map((key) => snakeCaseCreator(key)); | |
} if (_.isPlainObject(keys)) { | |
return Object.keys(keys).reduce( | |
(result, key) => ({ | |
...result, | |
[_.snakeCase(key)]: snakeCaseCreator(obj[key]), |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Mail</title> | |
<style type="text/css"> | |
#outlook a { | |
padding: 0; |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<title>Mail</title> | |
<style type="text/css"> | |
#outlook a { | |
padding: 0; |
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 mongoose = require('mongoose'); | |
const toCamel = (string) => string.replace(/([-_][a-z])/gi, ($1) => $1 | |
.toUpperCase() | |
.replace('-', '') | |
.replace('_', '')); | |
const isObject = (args) => args === Object(args) && !Array.isArray(args) && typeof args !== 'function'; | |
const keysToCamel = (args) => { |
NewerOlder