Skip to content

Instantly share code, notes, and snippets.

@celsomarques
celsomarques / README.md
Created September 1, 2025 19:25
Superset - OAuth2 - Custom attribute
@celsomarques
celsomarques / build.gradle
Created November 28, 2019 13:14 — forked from silas/build.gradle
Load `.env` into gradle run
def static getenv(path = ".env") {
def env = [:]
def file = new File(path)
if (file.exists()) {
file.eachLine { line ->
def (name, value) = line.tokenize("=")
env[name.trim()] = value.trim()
}
}
export default function compass (onChange, onFirst = function () { }) {
let hasListened = false;
OrientationPublisher.init(trigger);
function trigger (...args) {
if (!hasListened) {
onFirst(...args);
hasListened = true;
@celsomarques
celsomarques / minikube.md
Created February 27, 2017 14:26 — forked from codesword/minikube.md
Installing minikube using xhyve driver

###Install docker-machine-driver-xhyve docker-machine-driver-xhyve is a docker machine driver plugin for xhyve native OS X Hypervisor. xhyve is a lightweight OS X virtualization solution. In my opinion, it's a far better option than virtualbox for running minikube. ####Brew On MacOS sierra, download latest using

brew install docker-machine-driver-xhyve --HEAD
sudo chown root:wheel $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
sudo chmod u+s $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
@celsomarques
celsomarques / coordinatestoname.js
Last active August 29, 2015 14:27 — forked from AmirHossein/coordinatestoname.js
Get City and Country name by coordinates via Google Maps api
// Demo: http://jsfiddle.net/1yom6brx/1/
var latlng;
latlng = new google.maps.LatLng(40.730885, -73.997383); // New York, US
//latlng = new google.maps.LatLng(37.990849233935194, 23.738339349999933); // Athens, GR
//latlng = new google.maps.LatLng(48.8567, 2.3508); // Paris, FR
//latlng = new google.maps.LatLng(47.98247572667902, -102.49018710000001); // New Town, US
//latlng = new google.maps.LatLng(35.44448406385493, 50.99001635390618); // Parand, Tehran, IR
//latlng = new google.maps.LatLng(34.66431108560504, 50.89113940078118); // Saveh, Markazi, IR

Getting Started with NPM (as a developer)

If you haven't already set your NPM author info, now you should:

npm set init.author.name "Your Name"
npm set init.author.email "[email protected]"
npm set init.author.url "http://yourblog.com"

npm adduser