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 React, { Component } from 'react'; | |
import { Grid, Row, Col } from 'react-flexbox-grid'; | |
import { Cta } from './'; | |
import Api from './../../data'; | |
import ApiHun from './../../dataHun'; | |
class Faq extends Component { | |
componentDidMount() { | |
let language = this.props.lang; |
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 functions = require('firebase-functions'); | |
const request = require('request'); | |
exports.addMessageToSlack = functions.https.onRequest((req, resp) => { | |
return new Promise((resolve, reject) => { | |
const message = array['message']; | |
request.post( | |
"https://hooks.slack.com/X/Y/Z", | |
{ json: { text: `You have a new message: ${message}`} } | |
) |
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
<!DOCTYPE html> | |
<head> | |
<meta charset="utf-8"> | |
</head> | |
<body> | |
<form> | |
<input id="message" type="text"> | |
<input type="submit">submit> | |
</form> |
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
jQuery(function($) { | |
$(document).ready(function() { | |
const ajaxurl = '/contact'; | |
$("#chili-contact-form").submit(function(e) { | |
e.preventDefault(); | |
var messageObject = { | |
message: $("#message").val(); | |
//invoke the firebase cloud function | |
$.ajax({ | |
url : ajaxurl, |
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
{ | |
"hosting": { | |
"public": "/", | |
"ignore": [ | |
"firebase.json", | |
"**/.*", | |
"**/node_modules/**" | |
], | |
"rewrites": [ { | |
"source": "/contact", "function": "addMessageToSlack" |
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
version: '3.6' | |
services: | |
nginx: | |
image: nginx:latest | |
container_name: nginx | |
ports: | |
- '80:80' | |
- '443:443' | |
volumes: | |
- ./nginx:/etc/nginx/conf.d |
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
server { | |
listen 80; | |
server_name 127.0.0.1; | |
root /var/www/html; | |
index index.php; | |
access_log /var/log/nginx/access.log; | |
error_log /var/log/nginx/error.log; |
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
#!/bin/bash | |
protected_branch='master' | |
policy="\n\n[Policy] Never push code directly to the "$protected_branch" branch! ("$protected_branch" is locked! )\n\n" | |
current_branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,') | |
push_command=$(ps -ocommand= -p $PPID) |
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 path = require("path"); | |
module.exports = { | |
resolve: { | |
alias: { | |
'node_modules': path.join(__dirname, 'node_modules'), | |
} | |
}, | |
entry: { | |
"common" : "./js/site.js", |
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
#!/bin/bash | |
protected_branch='master' | |
policy="\n\n[Policy] Never push code directly to the "$protected_branch" branch! (Prevented with pre-push hook.)\n\n" | |
current_branch=$(git symbolic-ref HEAD | sed -e 's,.*/\(.*\),\1,') | |
push_command=$(ps -ocommand= -p $PPID) |
OlderNewer