-
Find the Discord channel in which you would like to send commits and other updates
-
In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe!
This file contains hidden or 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
"use strict"; | |
var fs = require("fs"); | |
let getLines = function getLines (filename, lineCount, callback) { | |
let stream = fs.createReadStream(filename, { | |
flags: "r", | |
encoding: "utf-8", | |
fd: null, | |
mode: 438, // 0666 in Octal |
This file contains hidden or 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
These commands are based on a askubuntu answer http://askubuntu.com/a/581497 | |
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below. | |
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING. | |
ABSOLUTELY NO WARRANTY. | |
If you are still reading let's carry on with the code. | |
sudo apt-get update && \ | |
sudo apt-get install build-essential software-properties-common -y && \ | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \ |
This file contains hidden or 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
// Modified version of https://github.com/megmage/chrome-export-passwords | |
// | |
// This script allows you to dump all of the passwords stored in your Chrome | |
// profile. I tested it with Chrome 56.0.2906.0 dev (64-bit) on Arch Linux and | |
// it worked quite well. | |
// | |
// Usage: | |
// | |
// - Navigate to chrome://settings-frame/passwords | |
// - Copy this code into a snippet in Chrome |
This file contains hidden or 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
window.grecaptcha = { | |
getResponse: function() { | |
return 'FAKE-RECAPTCHA-RESPONSE' | |
}, | |
reset: function() { | |
console.log("FAKE-RECAPTCHA-RESET", arguments) | |
}, | |
render: function() { |
This file contains hidden or 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 = { | |
webpack: (config) => { | |
const webpack = require('webpack') | |
const BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin | |
config.plugins = config.plugins || [] | |
config.plugins.push(new webpack.ContextReplacementPlugin(/moment[/\\]locale$/, /en/)) | |
config.plugins.push(new BundleAnalyzerPlugin()) | |
return config | |
} | |
} |
This file contains hidden or 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 app = require('express')(); | |
// define your routes, etc ... | |
exports.route = functions.https.onRequest((req, res) => { | |
// https://some-firebase-app-id.cloudfunctions.net/route | |
// without trailing "/" will have req.path = null, req.url = null | |
// which won't match to your app.get('/', ...) route | |
Note: This post is a summary of information paraphrased from an excellent blog post by Christian Sepulveda.
Create the app and download the necessary dependencies.