How to set up Go on WSL, Go environment and hello world Go application
- install Go from here
wget https://dl.google.com/go/go1.10.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.10.linux-amd64.tar.gz
- set up development folders
How to set up Go on WSL, Go environment and hello world Go application
wget https://dl.google.com/go/go1.10.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.10.linux-amd64.tar.gz
Go to Sublime Text 2 > Preferences > Key Bindings - User
and add this JSON to the file:
[
{ "keys": ["super+shift+l"],
"command": "insert_snippet",
"args": {
"contents": "console.log(${1:}$SELECTION);${0}"
}, "context":
[
/** | |
* The ultimate split path. | |
* Extracts dirname, filename, extension, and trailing URL params. | |
* Correct handles: | |
* empty dirname, | |
* empty extension, | |
* random input (extracts as filename), | |
* multiple extensions (only extracts the last one), | |
* dotfiles (however, will extract extension if there is one) | |
* @param {string} path |
copy from http://sed.sourceforge.net/sed1line.txt | |
------------------------------------------------------------------------- | |
USEFUL ONE-LINE SCRIPTS FOR SED (Unix stream editor) Dec. 29, 2005 | |
Compiled by Eric Pement - pemente[at]northpark[dot]edu version 5.5 | |
Latest version of this file (in English) is usually at: | |
http://sed.sourceforge.net/sed1line.txt | |
http://www.pement.org/sed/sed1line.txt | |
This file will also available in other languages: |
:: This assumes you are running from command line. To run from batch script, add the next commented out line to the top of | |
:: your batch file. Also, in a batch file the % sign before the i should be doubled, .e.g. %%i. | |
:: batch file only - remove preceeding semicolons from the next line and insert in batch file. | |
:: SETLOCAL ENABLEDELAYEDEXPANSION | |
:: from command prompt only - add the next line | |
cmd /v:on |
package recfun | |
import scala.collection.mutable.ListBuffer | |
import common._ | |
/** https://class.coursera.org/progfun-2012-001/assignment/view?assignment_id=4 */ | |
object Main { | |
def main(args: Array[String]) { | |
println("Pascal's Triangle") | |
for (row <- 0 to 10) { |
var parser = document.createElement('a'); | |
parser.href = "http://example.com:3000/pathname/?search=test#hash"; | |
parser.protocol; // => "http:" | |
parser.hostname; // => "example.com" | |
parser.port; // => "3000" | |
parser.pathname; // => "/pathname/" | |
parser.search; // => "?search=test" | |
parser.hash; // => "#hash" | |
parser.host; // => "example.com:3000" |