/*
Made by [egy.js](https://www.instagram.com/egy.js/);
*/
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 mysql = require('mysql'); | |
| exports.handler = (event, context, callback) => { | |
| var connection = mysql.createConnection({ | |
| host : 'rds.amazonaws.com', | |
| database : 'database', | |
| user : 'user', |
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
| npm adduser | |
| npm publish |
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
| ssh-keygen -t rsa -C "your-email-address" | |
| Be careful that you don't over-write your existing key for your personal account. Instead, when prompted, save the file as id_rsa_COMPANY. In my case, I've saved the file to ~/.ssh/id_rsa_s3bubble. | |
| vim ~/.ssh/id_rsa_COMPANY.pub | |
| touch ~/.ssh/config | |
| vim config | |
| #Default GitHub |
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
| function update_globals(){ | |
| if (!is_user_logged_in()) exit(); | |
| global $wpdb; | |
| $doesExist = $wpdb->get_row( "SELECT * FROM table WHERE id = " . get_current_user_id() ); | |
| // Update array | |
| $upValues = isset($_REQUEST) ? $_REQUEST : false; |
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
| (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) { |
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
| /** | |
| * Author (c) Hany alsamman | |
| * Licensed under the Apache-2.0 license. | |
| **/ | |
| (function () { | |
| /* jshint eqnull: true*/ | |
| /* global require */ | |
| 'use strict'; | |
| var videojs = null; |
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
| # Shutdown already running database instances | |
| ps ax | grep mongod | |
| kill -9 0000 | |
| # show databases | |
| show dbs | |
| # Switch current database to | |
| use <db> |
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
| /* | |
| * Setup push notification for Appc | |
| * callback | |
| */ | |
| // Android go to firebase https://console.firebase.google.com | |
| // Create project | |
| // Add android app | |
| // Enter SHA1 key run: keytool -exportcert -keystore keystore -list -v | |
| // Click project cog -> project settings and then cloud messaging |
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
| <?php | |
| /** | |
| * Finds mime types based on extension string | |
| * | |
| * @return mime type / application/octet-stream | |
| * @author @sameast | |
| */ | |
| function getMimeTypeFromExtensionString($key){ |