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
class EmailSender { | |
constructor(rateLimiter, projectId, queueLocation, queueName) { | |
this.rateLimiter = rateLimiter; | |
this.projectId = projectId; | |
this.queueLocation = queueLocation; | |
this.queueName = queueName; | |
} | |
async sendEmailWithRateLimit(from, to, subject, body, accountId, maxMessages, windowMs) { | |
const key = `${accountId}_email_rate_limit`; |
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
// firestoreFetchSingle - This is our logger and timer function which will log if the fetch took more than 60 seconds to return the result | |
// locations - fetch document by id | |
public static getById(id): Promise<Location> { | |
return new Promise<Location>(async(resolve, reject) => { | |
try { | |
const snapshot = await firestoreFetchSingle(Location.collectionRef().doc(id), 'location', id) | |
if (!snapshot.exists) return reject("location not found"); | |
const doc = new Location(snapshot); |
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
const freshChatToken = "<token-here>"; // Please update your token here | |
function clientInitFreshChat() { | |
window.fcWidget.init({ | |
token: freshChatToken, | |
host: 'https://wchat.freshchat.com', | |
config: { | |
headerProperty: { | |
hideChatButton: 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
:root { | |
--sidebar-bg-color: #0c2d3f; | |
--sidebar-parent-active-li-bg-color: rgba(24, 139, 246, .1); | |
--sidebar-li-color: #ffffff; | |
--sidebar-collapse-li-bg-color: #103855; | |
--custom-link-color: #38a0db; | |
--custom-primary: rgb(56, 160, 219); | |
--custom-primary-border-color: rgba(24, 139, 246, .1); | |
--custom-yellow-color: #ff6600; | |
--custom-yellow-active: #ff9900; |
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
# npm cache clean -f | |
# npm install -g n | |
# n stable |
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
<?php | |
namespace App\Http; | |
use Illuminate\Foundation\Http\Kernel as HttpKernel; | |
class Kernel extends HttpKernel | |
{ | |
/** | |
* The application's global HTTP middleware stack. |
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
mysqldump -u root -p database --ignore-table=database.table1 --ignore-table=database.table2 > dump.sql |
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 Vue from 'vue' | |
import moment from 'moment' | |
Vue.filter('formatDate', function (value) { | |
if (value) { | |
return moment(String(value)).format('MM/DD/YYYY hh:mm') | |
} | |
}) |
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
$sizeUnit: rem; | |
$marginKey: 'm'; | |
$paddingKey: 'p'; | |
$separator: '-'; | |
$sizes: ( ('none', 0), ('xxs', 0.125), ('xs', 0.25), ('sm', 0.5), ('md', 1), ('lg', 2), ('xl', 4), ('xxl', 8), ); | |
$positions: ( ('t', 'top'), ('r', 'right'), ('b', 'bottom'), ('l', 'left')); | |
@function sizeValue($key, $value) { | |
@return if($key=='none', 0, $value + $sizeUnit); | |
} |
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
function pushme { | |
br=`git branch | grep "*"` | |
params='' | |
for i in $*; | |
do | |
params=" $params $d$i" | |
done | |
git add --all |
NewerOlder