This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Random; | |
/** | |
* | |
* @author Vijini | |
*/ | |
//Main class | |
public class SimpleDemoGA { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
type Node struct { | |
ipAddress string | |
ports int | |
name string | |
next *Node | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
type Node struct { | |
ipAddress string | |
ports int | |
name string | |
next *Node | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
type Node struct { | |
ipAddress string | |
ports int | |
name string | |
next *Node | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import "fmt" | |
type Node struct { | |
ipAddress string | |
ports int | |
name string | |
next *Node | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) CREATE: SERVICE EXAMPLE | |
=================================== | |
ng g s roles/services/roles --skipTests -d | |
2) INTERFACE EXAMPLE: | |
====================== | |
ng g i roles/models/role model --skipTests -d | |
3) COMPONENT EXAMPLE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dockerCommands := Seq( | |
Cmd("FROM", "anapsix/alpine-java:jdk8"), | |
Cmd("MAINTAINER", maintainer.value), | |
Cmd("WORKDIR", "/opt/docker"), | |
Cmd("ADD", "/opt /opt"), | |
ExecCmd("RUN", "chown", "-R", "daemon:daemon", "."), | |
Cmd("USER", "daemon"), | |
ExecCmd("ENTRYPOINT", "bin/hashbot"), | |
ExecCmd("CMD", "") | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# maximum capability of system | |
user@ubuntu:~$ cat /proc/sys/fs/file-max | |
708444 | |
# available limit | |
user@ubuntu:~$ ulimit -n | |
1024 | |
# To increase the available limit to say 200000 | |
user@ubuntu:~$ sudo vim /etc/sysctl.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
./configure --prefix=/etc/nginx \ | |
--sbin-path=/usr/sbin/nginx \ | |
--modules-path=/usr/lib/nginx/modules \ | |
--conf-path=/etc/nginx/nginx.conf \ | |
--conf-path=/etc/nginx/nginx.conf \ | |
--error-log-path=/var/log/nginx/error.log \ | |
--pid-path=/var/run/nginx.pid \ | |
--lock-path=/var/run/nginx.lock \ | |
--user=nginx --group=nginx \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 |
NewerOlder