cd
mkdir -p .vim/{autoload,colors,syntax,plugin,spell,config}
mv .vimrc .vim/vimrc
ln -s .vim/vimrc .vimrc
cd ~/.vim
git clone https://github.com/tpope/vim-pathogen.git pathogen
cd autoload
// this code was tested using java ide from tutorials point | |
// see the running code on http://goo.gl/1pPhqd | |
import java.lang.*; | |
public class SampleExceptionCatching{ | |
public static void main(String []args){ | |
try{ | |
System.out.println("Hello World"); |
// this code was tested using java ide from tutorials point | |
// see the running code on http://goo.gl/nhXzCc | |
public class EnumWithPropertiesExample{ | |
public static void main(String []args){ | |
System.out.println("All car prices:"); | |
for (Car c : Car.values()){ | |
System.out.println(c + " costs " + c.getPrice() + " thousand dollars."); | |
} |
# You don't need Fog in Ruby or some other library to upload to S3 -- shell works perfectly fine | |
# This is how I upload my new Sol Trader builds (http://soltrader.net) | |
# Based on a modified script from here: http://tmont.com/blargh/2014/1/uploading-to-s3-in-bash | |
S3KEY="my aws key" | |
S3SECRET="my aws secret" # pass these in | |
function putS3 | |
{ | |
path=$1 |
'use strict'; | |
console.log('Loading function'); | |
var https = require('https'); | |
var PAGE_TOKEN = "EAASI6Z**********<fb tokenKey>"; | |
var VERIFY_TOKEN = "my_awesome_token"; | |
/** | |
* Provide an event that contains the following keys: | |
* |
'use strict'; | |
var https = require('https'); | |
var PAGE_TOKEN = "EAAJ6****"; | |
var VERIFY_TOKEN = "my_token******"; | |
exports.handler = (event, context, callback) => { | |
// process GET request | |
if(event.params && event.params.querystring){ | |
var queryParams = event.params.querystring; | |
var rVerifyToken = queryParams['hub.verify_token'] |
/* | |
* An example which shows how Static functions can be used in java | |
* available on Url : http://goo.gl/l2OWUn | |
*/ | |
public class HelloWorld{ | |
public static void main(String []args){ | |
System.out.println("Start Function"); | |
Student st = new Student(); |
This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12
- Installing Homebrew is effortless, open Terminal and enter :
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.
At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :
If you're doing stuff with Ruby on a Mac, e.g. installling Jekyll or something, by default you'll end up having to use the sudo
command to do stuff, since the permission to modify the default config is not available to your user account.
This sucks and should be avoided. Here's how to fix that.
To make this better, we are going install a new, custom Ruby. This used to be a big, scary thing, but thanks to the awesome tools Homebrew and rbenv, it's a snap.*
A word of warning: you will have to use Terminal to install this stuff. If you are uncomfortable with text, words, and doing stuff with your computer beyond pointing and hoping, this may not work well for you. But if that's the case, I'm not sure why you were trying to use Ruby in the first place.
(reference : https://tutorialzine.com/2017/07/javascript-async-await-explained)
-
Automatically transforms a regular function into a Promise.
-
When called async functions resolve with whatever is returned in their body.
-
Async functions enable the use of await.