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 above = function(limit){ | |
return function(value){ | |
return value > limit; | |
}; | |
}; | |
var isAbove10 = above(10); | |
console.log(isAbove10(5)); // false | |
console.log(isAbove10(8)); // false |
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
// using jQuery | |
$("#2020data").submit(function(e) { | |
$.ajax({ | |
url: "https://e0d92634.ngrok.io/test", | |
type: "POST", | |
data: new FormData(this), | |
processData: false, | |
contentType: false | |
}); |
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 config = require('./config.js').get(process.env.NODE_ENV); | |
var config = { | |
production: { | |
session: { | |
key: 'the.express.session.id', | |
secret: 'something.super.secret' | |
}, | |
database: 'mongodb://<user>:<pwd>@apollo.modulusmongo.net:27017/db', | |
twitter: { |
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
module.exports = { | |
email: { | |
address: 'youraddress@gmail.com', | |
password: 'clever-password' | |
} | |
}; |
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
# renew_before_expiry = 30 days | |
version = 0.19.0 | |
archive_dir = /etc/letsencrypt/archive/my-domain.com | |
cert = /etc/letsencrypt/live/my-domain.com/cert.pem | |
privkey = /etc/letsencrypt/live/my-domain.com/privkey.pem | |
chain = /etc/letsencrypt/live/my-domain.com/chain.pem | |
fullchain = /etc/letsencrypt/live/my-domain.com/fullchain.pem | |
# Options used in the renewal process | |
[renewalparams] |
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
:global { | |
.test { | |
position: absolute; | |
width:30px; | |
height:30px; | |
background: red; | |
display: block; | |
left:0px; | |
&:hover{ | |
transform: rotateY(0deg); |
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 moment = require('moment'); | |
const someAction = () => console.log('Actioning...'); | |
const wait = ms => new Promise((resolve, reject) => setTimeout(resolve, ms)); | |
const startCron = async () => { | |
while (true) { | |
if ( | |
moment().date() === |
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 removeDuplicates = csvStr => [...new Set(csvStr.split(',').map(tag => tag.trim()))].join(', '); |
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
export default [ | |
['Afrikaans (Suid-Afrika)', 'af-ZA'], | |
['አማርኛ (ኢትዮጵያ)', 'am-ET'], | |
['Հայ (Հայաստան)', 'hy-AM'], | |
['Azərbaycan (Azərbaycan)', 'az-AZ'], | |
['Bahasa Indonesia (Indonesia)', 'id-ID'], | |
['Bahasa Melayu (Malaysia)', 'ms-MY'], | |
['বাংলা (বাংলাদেশ)', 'bn-BD'], | |
['বাংলা (ভারত)', 'bn-IN'], | |
['Català (Espanya)', 'ca-ES'], |
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 axios = require("axios"); | |
const config = require("../security/auth.js"); | |
const callFreshbooks = async ( | |
xml, | |
apiUrl = config.freshbooks.url, | |
authToken = config.freshbooks.token | |
) => { | |
try { | |
const response = await axios({ |
OlderNewer