Skip to content

Instantly share code, notes, and snippets.

View relaxdiego's full-sized avatar
🤓

Mark Maglana relaxdiego

🤓
  • The Linux Foundation
  • Earth, Solar System, Milky Way, Laniakea
View GitHub Profile
mmaglana@localhost:~$ sudo -i
root@localhost:~# cd /var/snap/domotzpro-agent-publicstore/common/log
root@localhost:/var/snap/domotzpro-agent-publicstore/common/log# ls -al
total 8
drwxr-xr-x 2 root root 4096 Dec 5 02:59 .
drwxr-xr-x 5 root root 4096 Dec 5 02:59 ..
root@localhost:/var/snap/domotzpro-agent-publicstore/common/log# systemctl | grep domotz
mmaglana@localhost:~$ sudo cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu Core 18"
mmaglana@localhost:~$ sudo cat /etc/os-release
NAME="Ubuntu Core"
VERSION="18"
ID=ubuntu-core
Nov 29 08:54:22 raspberrypi domotzpro-agent-publicstore.domotzpro-agent-publicstore[1530]: ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
Nov 29 08:54:22 raspberrypi domotzpro-agent-publicstore.domotzpro-agent-publicstore[1530]: ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libarmmem-${PLATFORM}.so' from /etc/ld.so.preload cannot be preloaded (cannot open shared object file): ignored.
Nov 29 08:54:24 raspberrypi domotzpro-agent-publicstore.domotzpro-agent-publicstore[1530]: Skip the Updater simulation, status=(ubuntu_core,undefined)
Nov 29 08:54:24 raspberrypi domotzpro-agent-publicstore.domotzpro-agent-publicstore[1530]: MAIN - Start agent [2.8.1-b001] at Fri Nov 29 2019 08:54:24 GMT+0000 (GMT)
Nov 29 08:54:24 raspberrypi domotzpro-agent-publicstore.domotzpro-agent-publicstore[1530]: MAIN - +------------------------------------------------+
Nov 29 08:54:24 raspberrypi domotzpro-agent-publ
#!/bin/bash
set -e
arch=${1:-amd64}
repo=${2:-"http://ftp.us.debian.org/debian/dists/stable/main"}
url="${repo}/Contents-${arch}.gz"
gz_path="$HOME/.deb_content_files/$(sed -r 's|https?://||g' <<< $url)"
txt_path=${gz_path/%.gz/}
@relaxdiego
relaxdiego / in_main.py
Last active January 7, 2019 08:55
Initialize in main() vs outside main()
#!/usr/bin/python
from ansible.module_utils.basic import AnsibleModule
def main():
mod = AnsibleModule(
argument_spec=dict(
url=dict(required=True),
dest=dict(required=False, default="/tmp/firstmod")
)
GIT_VERSION=`git --version | awk '{print $3}'`
URL="https://raw.github.com/git/git/v$GIT_VERSION/contrib/completion/git-completion.bash"
PROFILE="$HOME/.bash_profile"
echo "Downloading git-completion for git version: $GIT_VERSION..."
if ! curl "$URL" --silent --output "$HOME/.git-completion.bash"; then
echo "ERROR: Couldn't download completion script. Make sure you have a working internet connection." && exit 1
fi
kind: List
apiVersion: v1
items:
- kind: Namespace
apiVersion: v1
metadata:
name: guestbook
- kind: Deployment
@relaxdiego
relaxdiego / readme.adoc
Created May 18, 2017 17:41 — forked from arun-gupta/readme.adoc
Kubernetes Cluster on AWS
  1. kops: https://github.com/kubernetes/kops

    1. Getting Started Guide: https://github.com/kubernetes/kops/blob/master/docs/aws.md

    2. Installing Kubernetes on AWS with kops: https://kubernetes.io/docs/getting-started-guides/kops/

    3. Mulit-master Kubernetes Cluster on AWS with kops: http://blog.arungupta.me/multimaster-kubernetes-cluster-amazon-kops/

    4. Booting Kubernetes on Amazon Elastic Compute with kops: https://deis.com/docs/workflow/quickstart/provider/aws/boot/

    5. Setting up an HA Kubernetes Cluster in AWS with private topology with kops 1.5.1: https://www.nivenly.com/kops-1-5-1/

    6. Kubernetes on AWS: https://daemonza.github.io/2017/01/15/kubernetes-on-aws/

    7. Your 2nd day with Kubernetes on AWS: https://www.nivenly.com/2nd-hour/

  2. Tectonic (Terraform): http://github.com/coreos/tectonic-installer

RB.Object = {
// Douglas Crockford's technique for object extension
// http://javascript.crockford.com/prototypal.html
create: function(){
function F(){}
F.prototype = arguments[0];
var obj = new F();
// Add all the other arguments as mixins that
// 'write over' any existing methods
[1] guard(main)> Run options: --seed 2796
# Running tests:
.
Finished tests in 0.001458s, 685.8711 tests/s, 685.8711 assertions/s.
1 tests, 1 assertions, 0 failures, 0 errors, 0 skips