I hereby claim:
- I am muniu on github.
- I am muniukariuki (https://keybase.io/muniukariuki) on keybase.
- I have a public key ASBPCHPB6WUjHbbLvYIP3lcsZ0csmOPBzG6bHGqRwA-22Ao
To claim this, I am signing this object:
package bill.boottest; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.boot.CommandLineRunner; | |
import org.springframework.boot.SpringApplication; | |
import org.springframework.boot.autoconfigure.SpringBootApplication; | |
import org.springframework.cloud.aws.messaging.listener.annotation.SqsListener; | |
import com.fasterxml.jackson.annotation.JsonCreator; |
I hereby claim:
To claim this, I am signing this object:
#!/bin/bash | |
function main() | |
{ | |
monitor_from_file $* | |
} | |
function monitor_vpn_ip_port() | |
{ | |
local CONN_NAME=$1 |
_complete_ssh_hosts () | |
{ | |
COMPREPLY=() | |
cur="${COMP_WORDS[COMP_CWORD]}" | |
comp_ssh_hosts=`cat ~/.ssh/known_hosts | \ | |
cut -f 1 -d ' ' | \ | |
sed -e s/,.*//g | \ | |
grep -v ^# | \ | |
uniq | \ | |
grep -v "\[" ; |
#Create Group | |
# groupadd tomcat | |
# useradd -g tomcat -d /usrlocal/tomcat8 tomcat | |
# usermod -G www-data tomcat | |
# chown tomcat:tomcat /usrlocal/tomcat8 -R | |
# vim /etc/init.d/tomcat | |
#!/bin/sh |
Server Tasks | |
1. Change root password | |
2. Change ssh port (assume to be 4444) | |
nano /etc/ssh/sshd_config(change port to between 1025 and 65536) | |
PermitRootLogin no | |
service ssh restart | |
ssh -p 4444 demo@SERVER_IP_ADDRESS |
I'm going to cover a simple, but effective, utility for managing state and transitions (aka workflow). We often need to store the state (status) of a model and it should only be in one state at a time.
#!/usr/bin/env python | |
import random | |
import struct | |
import sys | |
# Most of the Fat32 class was cribbed from https://gist.github.com/jonte/4577833 | |
def ppNum(num): | |
return "%s (%s)" % (hex(num), num) |