(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
const stripe = require('stripe')(process.env.STRIPE_SECRET_KEY); | |
const { | |
updateUserSubscription, | |
deleteUserSubscription, | |
} = require('./database'); | |
exports.handler = async function (event, context, callback) { | |
const webhookSecret = process.env.STRIPE_WEBHOOK_SECRET; | |
try { | |
const requestId = event?.requestContext?.requestId; |
# Change to the project directory | |
cd $FORGE_SITE_PATH | |
# Turn on maintenance mode | |
php artisan down || true | |
# Pull the latest changes from the git repository | |
# git reset --hard | |
# git clean -df | |
git pull origin $FORGE_SITE_BRANCH |
on run | |
set imessage_id to "" -- leave blank to skip sending periodic iMessage progress updates, put your iMessage ID here to get updates as the script runs | |
set delay_seconds to 5 -- Don't set to 0, it runs too fast. 0.75 is a good setting for "go fast". | |
set computer_name to do shell script "scutil --get ComputerName" | |
set os_version to do shell script "sw_vers -productVersion" | |
set os_build to do shell script "sw_vers -buildVersion" | |
set _uptime to do shell script "uptime" | |
set url_list to {"http://techmeme.com", "http://www.consumerreports.org/laptops/macbook-pros-fail-to-earn-consumer-reports-recommendation/", "https://twitter.com/panzer/status/812367550734401536", "http://www.politico.com/story/2016/12/foreign-travelers-social-media-232930", "http://www.macworld.com/article/3153384/gaming/nintendo-plans-to-release-2-or-3-mobile-games-a-year-after-super-mario-runs-success.html", "http://www.wsj.com/articles/cyber-experts-cite-link-between-dnc-hacks-and-aggression-against-uk |
/* | |
Source: http://www.portugal-a-programar.pt/topic/58852-algoritmo-de-validacao-de-nif-pt/ | |
*/ | |
function validaContribuinte(contribuinte){ | |
// algoritmo de validação do NIF de acordo com | |
// http://pt.wikipedia.org/wiki/N%C3%BAmero_de_identifica%C3%A7%C3%A3o_fiscal | |
var temErro=0; |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
// -------------------------------------------------- | |
// Flexbox LESS mixins | |
// The spec: http://www.w3.org/TR/css3-flexbox | |
// -------------------------------------------------- | |
// Flexbox display | |
// flex or inline-flex | |
.flex-display(@display: flex) { | |
display: ~"-webkit-@{display}"; | |
display: ~"-ms-@{display}box"; // IE10 uses -ms-flexbox |
<VirtualHost *:80> | |
ServerAdmin {USER}@cslavoie.com | |
ServerName {DOMAIN} | |
ServerAlias www.{DOMAIN} | |
ServerAlias {USER}.localhost | |
ServerAlias {USER}.static.cslavoie.com | |
DocumentRoot {DOC_ROOT} | |
<Directory {DOC_ROOT}> |
// | |
// Regular Expression for URL validation | |
// | |
// Author: Diego Perini | |
// Created: 2010/12/05 | |
// Updated: 2018/09/12 | |
// License: MIT | |
// | |
// Copyright (c) 2010-2018 Diego Perini (http://www.iport.it) | |
// |