$ mkdir -p beaglelfs/{sources,rootfs_install,boot_mnt,rootfs_mnt}
Download the latest i686 Binary TAR of the ARM GNU/Linux (glibc-based) Lite Toolchain:
#!/bin/bash | |
# Author: Param Aggarwal | |
# Multipart parallel downloader in Shell using cURL | |
if [[ $# -lt 1 ]]; then | |
echo "$0: Pass URL to download as argument" | |
exit 1 | |
fi | |
url=$1 |
# https://github.com/mattr-/slate | |
#half left - full - half right | |
bind 1:alt,cmd move screenOriginX;screenOriginY screenSizeX/2;screenSizeY | |
bind 2:alt,cmd move screenOriginX;screenOriginY screenSizeX;screenSizeY | |
bind 3:alt,cmd move screenOriginX+screenSizeX/2;screenOriginY screenSizeX/2;screenSizeY | |
#1/3 left - center - right | |
bind 4:alt,cmd move screenOriginX;screenOriginY screenSizeX/3;screenSizeY | |
bind 5:alt,cmd move screenOriginX+screenSizeX/3;screenOriginY screenSizeX/3;screenSizeY |
require "cjson" | |
local util = require("util") | |
-- https://github.com/mozilla-services/lua_sandbox/blob/master/modules/util.lua | |
local message = { | |
Type = "IGNORE", | |
Fields = {} | |
} |
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
vim = RbVmomi::VIM.connect host: vcenter.hostname, user: vcenter.username, password: vcenter.password, insecure: true | |
pm = vim.serviceInstance.content.perfManager | |
# this is for a single cluster with hosts directly in one cluster. 'first' returns the cluster object. | |
hosts = vim.serviceInstance.find_datacenter.hostFolder.children.first.host | |
pm.retrieve_stats([hosts[0]], ['cpu.usagemhz'], {interval: '300', start_time: (Time.now - 6.hours)}).first[1][:metrics]['cpu.usagemhz'] | |
# This above query queries for the 'cpu.usagemhz' counter, which by default matches the (none) rollup counter (NOT THE AVERAGE) in vSphere API. | |
# This is a problem with the RbVmomi gem helper function "retrieve_stats" only. To override this, use the following manual counter selection: |
package com.elbart; | |
import javax.ws.rs.GET; | |
import javax.ws.rs.Path; | |
import javax.ws.rs.Produces; | |
import javax.ws.rs.QueryParam; | |
import com.google.inject.servlet.RequestScoped; | |
@Path("bound/perrequest") |
class Numeric | |
def to_rad | |
self * Math::PI / 180 | |
end | |
end | |
# http://www.movable-type.co.uk/scripts/latlong.html | |
# loc1 and loc2 are arrays of [latitude, longitude] | |
def distance loc1, loc2 | |
lat1, lon1 = loc1 |