type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
var MandrillApi = {}; | |
MandrillApi.key = 'KpRWQQv1hIhKhkS1i7Az2A'; | |
MandrillApi.theform = $('#demo'); | |
MandrillApi.arrayBufferToProperBase64 = function(buffer) { | |
var binary = ''; | |
var bytes = new Uint8Array( buffer ); | |
var len = bytes.byteLength; | |
for (var i = 0; i < len; i++) { | |
binary += String.fromCharCode( bytes[ i ] ); |
<?php | |
/** | |
* deploy.php by Hayden Schiff (oxguy3) | |
* Available at https://gist.github.com/oxguy3/70ea582d951d4b0f78edec282a2bebf9 | |
* | |
* No rights reserved. Dedicated to public domain via CC0 1.0 Universal. | |
* See https://creativecommons.org/publicdomain/zero/1.0/ for terms. | |
*/ | |
// random string of characters; must match the "Secret" defined in your GitHub webhook |
type below:
brew update
brew install redis
To have launchd start redis now and restart at login:
brew services start redis
The only way I've succeeded so far is to employ SSH.
Assuming you are new to this like me, first I'd like to share with you that your Mac has a SSH config
file in a .ssh
directory. The config
file is where you draw relations of your SSH keys to each GitHub (or Bitbucket) account, and all your SSH keys generated are saved into .ssh
directory by default. You can navigate to it by running cd ~/.ssh
within your terminal, open the config
file with any editor, and it should look something like this:
Host * AddKeysToAgent yes
> UseKeyChain yes
const storage = require('@google-cloud/storage') | |
const createUuid = require("uuid-v4") | |
const credentials = require('./test-firebase-credentials.json') | |
const firebaseProjectName = 'test' | |
const bucketName = `${firebaseProjectName}.appspot.com` | |
const bucket = storage({ credentials }).bucket(bucketName) | |
module.exports = firebaseSaveFile |
Reproducing types/sequelize/120. Run npm test
to see compile errors.
index.ts(14,3): error TS2345: Argument of type '{ scopes: { human: { slack_id: { $ne: string; }; }; }; }' is not assignable to parameter of type 'InitOptions'.
Property 'sequelize' is missing in type '{ scopes: { human: { slack_id: { $ne: string; }; }; }; }'.
index.ts(25,1): error TS2684: The 'this' context of type 'typeof Model' is not assignable to method's 'this' of type '(new () => Model) & typeof Model'.
Type 'typeof Model' is not assignable to type 'new () => Model'.
Cannot assign an abstract constructor type to a non-abstract constructor type.
// This is example of using crypto.createCipheriv(), because | |
// crypto.createCipher() is deprecated since Node.js v10 | |
const crypto = require('crypto') | |
const encrypto = { | |
encrypt(text, password) { | |
const key = password.repeat(32).substr(0, 32) | |
const iv = password.repeat(16).substr(0, 16) |
/** | |
* Convert a string to snake case. | |
* | |
* @param string $value | |
* @param string $delimiter Default to underscore | |
* | |
* @return string | |
*/ | |
public function snake(string $value, ?string $delimiter = null): string | |
{ |
Making multiple MySQL versions work with Homebrew was tricky to say the least. Fortunately there are 2 new easy ways that I learned of to achieve this.
As @4unkur and @henrytirla commented below, there is this extremely easy to use app called DBngin, which lets you setup multiple databases (not only MySQL) simultaneously using different ports:
export default class http { | |
async download(endpoint) { | |
const token = this.loadToken(); | |
const invoice = await axios({ | |
url: `${this.NEST_APP_IP}/${endpoint}`, | |
method: 'GET', | |
responseType: 'blob', | |
headers: { | |
Authorization: `Bearer ${token}` | |
}}).then((response) => { |