Skip to content

Instantly share code, notes, and snippets.

Norman Khine nkhine

View GitHub Profile
View crucible.yml
---
AWSTemplateFormatVersion: '2010-09-09'
Description: 'Crucible: highly available Fisheye/Crucible template.'
Metadata:
'AWS::CloudFormation::Interface':
ParameterGroups:
- Label:
default: 'Parent Stacks'
Parameters:
- ParentVPCStack
@nkhine
nkhine / vpnclient
Created Sep 2, 2019 — forked from legokichi/vpnclient
softether vpn client for ubuntu /etc/init.d/vpnclient
View vpnclient
#! /bin/sh
### BEGIN INIT INFO
# Provides: vpnclient
# Required-Start: $all
# Required-Stop: $network $local_fs $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start VPN Client at boot time
# chkconfig: 345 44 56
# description: Start VPN Client at boot time.
View gist:978f52cc40783c6d0345d3413be5243a
```
Thread Dump
DestroyJavaVM
"DestroyJavaVM" Id=22 Group=main RUNNABLE
FilePath.localPool [#7]
"FilePath.localPool [#7]" Id=94 Group=main RUNNABLE
at sun.management.ThreadImpl.dumpThreads0(Native Method)
View gist:0fdccb79980d054ccc210ae6a0cdebaf
Administrator CMD
C:\> hcsdiag list
C:\> hcsdiag kill wsl
C:\> wsl -l
C:\> wsl -d alpine
LOE-WSL:/mnt/c#
@nkhine
nkhine / docker-selinux.md
Last active Apr 28, 2019
SELinux and docker notes
View docker-selinux.md
layout title date categories
post
SELinux and docker notes
2018-02-13 13:13:59 +0200
docker selinux

SELinux and docker notes

What it takes to run our containers with SELinux enabled.

View usefull commands
# 1. redo last command but as root
sudo !!
# 2. open an editor to run a command
ctrl+x+e
# 3. create a super fast ram disk
mkdir -p /mnt/ram
mount -t tmpfs tmpfs /mnt/ram -o size=8192M
@nkhine
nkhine / make go executible
Last active Apr 27, 2019
if we want to use go like python and executed without gorun
View make go executible
```
echo ':golang:E::go::/usr/local/bin/gorun:OC' | sudo tee /proc/sys/fs/binfmt_misc/register
:golang:E::go::/usr/local/bin/gorun:OC
```
```
package main
import (
"fmt"
View gist:0b7f5c162313946ddd2f8d7feb57144a
bash-4.4# ruby-build -v 1.8.7 /usr/local
Downloading ruby-1.8.7.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/1.8/ruby-1.8.7.tar.bz2
/tmp/ruby-build.20190128170412.7047 /tmp/ruby-build
Installing ruby-1.8.7...
WARNING: ruby-1.8.7 is past its end of life and is now unsupported.
It no longer receives bug fixes or critical security updates.
/tmp/ruby-build.20190128170412.7047/ruby-1.8.7 /tmp/ruby-build.20190128170412.7047 /tmp/ruby-build
@nkhine
nkhine / kubectl.md
Last active Jul 16, 2019 — forked from so0k/kubectl.md
Playing with kubectl output
View kubectl.md

Kubectl output options

Let's look at some basic kubectl output options.

Our intention is to list nodes (with their AWS InstanceId) and Pods (sorted by node).

We can start with:

kubectl get no
View gist:c4b7c9a98fced7d306b1ae6199ba075c
Python 2.7.15rc1 (default, Apr 15 2018, 21:51:34)
[GCC 7.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyexcel as p
>>> dict_list=[{'alfa':['001','2'], 'beta':['001','3'], 'gamma':['001','2']},
... {'alfa':['002','6'], 'beta':['002','4'], 'omega':['002','7']}]
>>>
>>> s = p.Sheet()
>>> for d in dict_list:
... s.row += p.get_sheet(adict=d, transpose_after=True)
You can’t perform that action at this time.