Skip to content

Instantly share code, notes, and snippets.

@nictuku
nictuku / custom.binds
Last active August 29, 2015 14:05
My PS3 button mapping for Elite: Dangerous
<?xml version="1.0" encoding="UTF-8" ?>
<Root>
<MouseXMode Value="" />
<MouseYMode Value="" />
<MouseDecay Value="1" />
<MouseHeadlook Value="0" />
<MouseSensitivity Value="0.89999998" />
<MouseDeadzone Value="0.04742857" />
<MouseLinearity Value="1.00000000" />
<YawAxis>
@nictuku
nictuku / edd.go
Created August 31, 2014 08:54
elite dangerous distances
package main
import (
"fmt"
"strings"
)
var distances = `26 Draconis,-39.000000,24.906250,-0.656250
Acihaut,-18.500000,25.281250,-4.000000
Aganippe,-11.562500,43.812500,11.625000
@nictuku
nictuku / netIP.go
Last active August 29, 2015 14:06
net.IP Marshalling in JSON and YAML
package main
import (
"encoding/json"
"fmt"
"net"
"github.com/GoogleCloudPlatform/kubernetes/Godeps/_workspace/src/gopkg.in/v1/yaml"
)
#!/bin/bash
# Expects Ubuntu 16.06 (xenial) and kernel 4.x.
# Based upon a blog post by Zach at http://zachzimm.com/blog/?p=191
set -eux
# Have the user call sudo early so the credentials is valid later on
sudo whoami
#!/bin/bash
# Creates a 1GB swapfile and permanently enables it.
# thanks to:
# https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-16-04
set -eu
sudo fallocate -l 1G /swapfile
sudo chmod 600 /swapfile
$ for run in {1..3}; do time bazel build //helloworld/server:hello_server_kube_dev_deploy.create;done
INFO: (12-14 14:17:29.488) Found 1 target...
Target //helloworld/server:hello_server_kube_dev_deploy.create up-to-date:
bazel-bin/helloworld/server/hello_server_kube_dev_deploy.create
INFO: (12-14 14:17:37.956) Elapsed time: 27.153s, Critical Path: 2.84s
real 0m28.737s
user 0m41.797s
sys 0m6.843s
INFO: (12-14 14:17:55.494) Found 1 target...
Target //helloworld/server:hello_server_kube_dev_deploy.create up-to-date:
$ for run in {1..3}; do time bazel build //helloworld/server:hello_server_kube_dev_deploy.create;done
INFO: (12-14 15:11:11.353) Found 1 target...
Target //helloworld/server:hello_server_kube_dev_deploy.create up-to-date:
bazel-bin/helloworld/server/hello_server_kube_dev_deploy.create
INFO: (12-14 15:11:11.688) Elapsed time: 0.680s, Critical Path: 0.00s
real 0m0.899s
user 0m0.159s
sys 0m0.054s
INFO: (12-14 15:11:12.137) Found 1 target...
{
"apiVersion": "v1",
"items": [
{
"apiVersion": "extensions/v1beta1",
"kind": "Deployment",
"metadata": {
"name": "service-app-deployment"
},
"spec": {
yves@MacBook-Air:~/src/github.com/nictuku/microclusters$ bazel build @com_github_grpc_grpc//test/cpp/util:grpc_cli
INFO: (12-25 15:46:16.877) Loading package: @local_config_cc//
INFO: (12-25 15:46:24.620) Found 1 target...
INFO: (12-25 15:47:45.555) From Compiling external/com_google_protobuf/src/google/protobuf/compiler/js/embed.cc [for host]:
external/com_google_protobuf/src/google/protobuf/compiler/js/embed.cc:37:12: warning: unused variable 'output_file' [-Wunused-const-variable]
const char output_file[] = "well_known_types_embed.cc";
^
@nictuku
nictuku / YB_CLA
Created January 26, 2018 01:08
YourBase Contributor License Agreement
Fiduciary License Agreement 2.0
-------------------------------
based on the
Individual Contributor exclusive License Agreement
--------------------------------------------------
(including the Traditional Patent License OPTION)
-------------------------------------------------