Skip to content

Instantly share code, notes, and snippets.

View masasdani's full-sized avatar

Masas Dani masasdani

View GitHub Profile
@masasdani
masasdani / config_server.sh
Last active August 29, 2015 13:57
standar config server
#ubuntu 12.04
#add a sudo user
adduser username
adduser username sudo
#setting timezone
sudo dpkg-reconfigure tzdata
#install lamp
@masasdani
masasdani / show listening port
Created September 26, 2014 19:46
mac os show port listening
sudo lsof -nP -iTCP -sTCP:LISTEN
@masasdani
masasdani / fix-maven-artifact-fail.sh
Last active August 29, 2015 14:07
Maven error “Failure to transfer…”
find ~/.m2 -name "*.lastUpdated" -exec grep -q "Could not transfer" {} \; -print -exec rm {} \;
@masasdani
masasdani / jboss.sh
Last active August 29, 2015 14:07
Jboss Server
# start jboss stand alone
./standalone.sh -Djboss.bind.address=0.0.0.0 -Djboss.bind.address.management=0.0.0.0 &
# stop jboss
./jboss-cli.sh --connect command=:shutdown
@masasdani
masasdani / launch-daemon-mac
Created November 19, 2015 06:31
macos create auto start app
#location
#/Library/LaunchDaemons
#name
#com.mysql.mysql.plist
#sudo chown root /Library/LaunchDaemons/com.mysql.mysql.plist
#sudo chgrp wheel /Library/LaunchDaemons/com.mysql.mysql.plist
#sudo chmod 644 /Library/LaunchDaemons/com.mysql.mysql.plist
#sudo launchctl load -w /Library/LaunchDaemons/com.mysql.mysql.plist
<?xml version="1.0" encoding="UTF-8"?>
//this will remove all collection except system.*
use <name_of_database>
db.getCollectionNames().forEach(function(c) { if (c.indexOf("system.") == -1) db[c].drop(); })
@masasdani
masasdani / logback.xml
Created February 28, 2017 10:55 — forked from kyungw00k/logback.xml
logback & logstash pattern for elasticsearch
<?xml version="1.0" encoding="UTF-8"?>
<!-- For assistance related to logback-translator or configurations -->
<!-- files in general, please contact the logback user mailing list -->
<!-- at http://www.qos.ch/mailman/listinfo/logback-user -->
<!-- -->
<!-- For professional support please see -->
<!-- http://www.qos.ch/shop/products/professionalSupport -->
<!-- -->
<configuration>
@masasdani
masasdani / letsencrypt-nginx-centos.md
Last active May 26, 2021 13:00
letsencyript SSL nginx proxy centos 7

Install Letsencrypt Nginx Centos 7

install certbot

  sudo yum install epel-release
  sudo yum update
  sudo yum install certbot

install nginx

  sudo yum install nginx

sudo systemctl start nginx

{
"1": ["@yopie", "@Zulfikar_ltf", "@dinandans", "@FarahOktarina"],
"2": ["@masasdani", "@Vincensius", "@wuland_manyun", "@ikenurasih"],
"3": ["@irfanfirdaus", "@deny_ervan", "@nanangarsyad", "@Jumroh"],
"4": ["@timenz", "@Marvinhidajat", "@angga_1927", "@alfinma"],
"5": ["@johjuda", "@ndiyandii", "@Fendy1983", "@GalehWP"],
"6": ["@ShariSherenHuth", "@rosyiandika", "@Fadlan9", "@exza_a"],
"7": ["@Zulfikar_ltf", "@gittamaruhawa", "@RyanArrofiq", "@Fadlan9"],
"8": ["@Vincensius", "@ndiyandii", "@dinandans", "@okutasan"],
"9": ["@deny_ervan", "@yopie", "@wuland_manyun", "@ikenurasih"],