Execute this code in your repository
git filter-branch --force --index-filter \
'git rm --cached --ignore-unmatch .env' \
--prune-empty --tag-name-filter cat -- --all
| echo '.env' >> .gitignore | |
| git rm -r --cached .env | |
| git add .gitignore | |
| git commit -m 'untracking .env' | |
| git push origin master |
| /** | |
| * This gist was inspired from https://gist.github.com/homam/8646090 which I wanted to work when uploading an image from | |
| * a base64 string. | |
| * Updated to use Promise (bluebird) | |
| * Web: https://mayneweb.com | |
| * | |
| * @param {string} base64 Data | |
| * @return {string} Image url | |
| */ | |
| const imageUpload = async (base64) => { |
| var url = "Hello World"; | |
| var data = []; | |
| for (var i = 0; i < url.length; i++){ | |
| data.push(url.charCodeAt(i)); | |
| } |
| /** | |
| * Merge defaults with user options | |
| * @private | |
| * @param {Object} defaults Default settings | |
| * @param {Object} options User options | |
| * @returns {Object} Merged values of defaults and options | |
| */ | |
| var extend = function ( defaults, options ) { | |
| var extended = {}; | |
| var prop; |
| (function (root, factory) { | |
| if ( typeof define === 'function' && define.amd ) { | |
| define([], factory(root)); | |
| } else if ( typeof exports === 'object' ) { | |
| module.exports = factory(root); | |
| } else { | |
| root.myPlugin = factory(root); | |
| } | |
| })(typeof global !== "undefined" ? global : this.window || this.global, function (root) { |
| var AWS = require('aws-sdk'), | |
| fs = require('fs'); | |
| // For dev purposes only | |
| AWS.config.update({ accessKeyId: '...', secretAccessKey: '...' }); | |
| // Read in the file, convert it to base64, store to S3 | |
| fs.readFile('del.txt', function (err, data) { | |
| if (err) { throw err; } |
| #!/bin/sh | |
| set -e | |
| if [ -e /.installed ]; then | |
| echo 'Already installed.' | |
| else | |
| echo '' | |
| echo 'INSTALLING' | |
| echo '----------' |
| /*global console */ | |
| /* | |
| * In this file, we do a search for two non-existent selectors | |
| * However the failure of only one of them contains the error we actually want | |
| */ | |
| (function() { | |
| "use strict"; |
| var webdriver = require('selenium-webdriver'); | |
| var fs = require('fs'); | |
| var driver = new webdriver.Builder().build(); | |
| webdriver.WebDriver.prototype.saveScreenshot = function(filename) { | |
| return driver.takeScreenshot().then(function(data) { | |
| fs.writeFile(filename, data.replace(/^data:image\/png;base64,/,''), 'base64', function(err) { | |
| if(err) throw err; | |
| }); |