System: Ubuntu 14.04 (Trusty Tahr)
As mentioned here, to update a go version you will first need to uninstall the original version.
To uninstall, delete the /usr/local/go
directory by:
import DS from 'ember-data'; | |
import Ember from 'ember'; | |
import ENV from 'myapp/config/environment'; | |
import appVersion from '../utils/app-version'; | |
export default DS.JSONAPIAdapter.extend({ | |
host: ENV.APP.API_URL, | |
init() { | |
this.set('appVersion', appVersion()); |
/******************************************************************************* | |
* Description: | |
* | |
* Gulp file to push changes to remote servers (eg: staging/production) | |
* | |
* Usage: | |
* | |
* gulp deploy --target | |
* | |
* Examples: |
function convert_coord_to_dms (lat, lon) { | |
/* | |
Se Lat é positivo é Norte, senão Sul | |
Se Long é positivo é Leste, senão Oeste | |
*/ | |
var lat_orientation = lat < 0 ? "S" : "N", | |
lon_orientation = lat < 0 ? "W" : "E"; | |
function get_dms(decimal) { |
System: Ubuntu 14.04 (Trusty Tahr)
As mentioned here, to update a go version you will first need to uninstall the original version.
To uninstall, delete the /usr/local/go
directory by:
package main | |
import ( | |
"flag" | |
"fmt" | |
"time" | |
) | |
// Fake a long and difficult work. | |
func DoWork() { |
Preferences/Editor/Code Style/HTML -> Tabs and Indent (tab) -> Tab size, Indent, Continuation Indent to 2
Preferences/Editor/Code Style/HTML -> Other (tab) -> Spaces -> In Empty Tag (check this option)
Preferences/Editor/Code Style/HTML -> Other (tab) -> Do not indent children of -> Add script and style
/* | |
Incredibly simple Node.js and Express application server for serving static assets. | |
Given as an example from the React Router documentation (along with examples | |
using nginx and Apache): | |
- https://github.com/ReactTraining/react-router/blob/master/docs/guides/Histories.md#browserhistory | |
*/ | |
const express = require('express'); | |
const path = require('path'); |
#!/bin/bash | |
# Add to instance metadata with `gcloud compute instances add-metadata \ | |
# instance-name --metadata-from-file startup-script=idle-shutdown.sh` and reboot | |
# NOTE: requires `bc`, eg, sudo apt-get install bc | |
# Modified from https://stackoverflow.com/questions/30556920/how-can-i-automatically-kill-idle-gce-instances-based-on-cpu-usage | |
threshold=0.1 | |
count=0 | |
wait_minutes=60 | |
while true |
function mapConcurrently(input, mapper, concurrency) { | |
let i = 0; | |
const result = []; | |
let pending = 0; | |
let done = false; | |
const promise = new Promise(function (resolve, reject) { | |
function startOne() { | |
if (done) return; | |
if (i == input.length) { | |
if (pending == 0) { |