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
Promise.all([ | |
import('firebase/app'), | |
import('firebase/database'), | |
import('firebase/auth'), | |
]) | |
.then(x => x[0].default) | |
.then(firebase => { | |
const config = { | |
apiKey: '', | |
authDomain: '', |
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
Tags: Sublime Text 2 License Key, Sublime Text 3 License Key, Sublime Text Full Version, Sublime Text 3 version 3103. | |
Go to menu Help > Enter License. | |
—– BEGIN LICENSE —– | |
Michael Barnes | |
Single User License |
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
// This is the index.js file for my Parse Live Query Server, running on a separate EC2 instance | |
var express = require('express'); | |
var cors = require('cors') | |
var ParseServer = require('parse-server').ParseServer; | |
var app = express(); | |
app.use(cors()); | |
// We include the lines below so that we can hit `/` and it passes the Elastic Beanstalk Health Check |
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
<template> | |
<button class="btn btn-sm btn-primary" v-on:click="togglefav" ><i v-bind:class="[is_fav ? 'fa-heart' : 'fa-heart-o', 'fa']" aria-hidden="true"></i></button> | |
</template> | |
<script> | |
export default { | |
props:['is_fav'], | |
methods:{ | |
togglefav:function(){ | |
this.$emit('togglefav',!this.is_fav); |
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
This demonstrates how to make client side certificates with go | |
First generate the certificates with | |
./makecert.sh test@test.com | |
Run the server in one terminal | |
go run server.go |
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
// Original post: https://github.com/gin-gonic/gin/issues/686#issuecomment-240619920 | |
router.POST("/api/v1/endpoint1", ReverseProxy()) | |
func ReverseProxy() gin.HandlerFunc { | |
target := "localhost:3000" | |
return func(c *gin.Context) { | |
director := func(req *http.Request) { | |
r := c.Request |
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 fs from 'fs-extra'; | |
import glob from 'glob'; | |
import { exec } from 'child_process'; | |
const coverageOutputDir = '.nyc_output'; | |
fs.emptyDirSync(coverageOutputDir); | |
glob('**/coverage-final.json', (err, coverageFiles) => { | |
if (err) { |
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 lookup = require('dns-lookup'); | |
var fetch = require('node-fetch'); | |
lookup('dyaa.ddns.net', function (err, address, family) { | |
fetch(`https://dynamicdns.park-your-domain.com/update?host=[HOST]&domain=[DOMAIN_NAME]&password=[PASSWORD]&ip=${address}`); | |
}); |
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
load('api_config.js'); | |
load('api_gpio.js'); | |
load('api_mqtt.js'); | |
load('api_net.js'); | |
load('api_sys.js'); | |
load('api_timer.js'); | |
// Helper C function get_led_gpio_pin() in src/main.c returns built-in LED GPIO | |
// ffi() returns a callbale object for the specified C function. | |
// As parsing the signature has non-trivial overhead, it's a good practice to |
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
/* | |
Copyright 2016 Google Inc. All Rights Reserved. | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software | |
distributed under the License is distributed on an "AS IS" BASIS, | |
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
See the License for the specific language governing permissions and |
NewerOlder