Skip to content

Instantly share code, notes, and snippets.

Achmad Nasirudin Sandi achmadns

Block or report user

Report or block achmadns

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@achmadns
achmadns / show-retention-policies.sh
Created Oct 9, 2017
Show retention policies on InfluxDB through CLI
View show-retention-policies.sh
#!/bin/bash
for x in `influx -execute 'show databases' | grep -v -e ^name -e --- -e ^_internal`;do printf "RETENTION POLICIES ON $x \n"; influx -execute "SHOW RETENTION POLICIES ON $x";done
@achmadns
achmadns / print-param.sh
Created May 12, 2017
Print and Iterate Shell Script Parameters
View print-param.sh
#!/bin/bash
: '
Example
$ ./print-param.sh 4 2 3 4 5 6
4 2 3 4 5 6
4
2
3
4
5
View graph-for-identity-access-management.adoc

Entitlements and Access Control Management

This interactive Neo4j graph tutorial covers entitlements and access control scenarios.


View rabbitmq-federation.sh
# assuming we want forward message published to exchange ams.* from broker A to broker B
# there is no any configuration update on broker A except credential needed by B to connect the upstream
# see https://www.rabbitmq.com/federation.html for details
# do these on broker B
# enable rabbitmq federation plugin
rabbitmq-plugins enable rabbitmq_federation
View activate-rabbitmqadmin.sh
#/bin/bash
# these action should be run with sudo level
# activate management plugin first
rabbitmq-plugins enable rabbitmq_management
# restart the rabbitmq-server
service rabbitmq-server restart
# download the rabbitmqadmin script locally
View history.sh
sudo apt-get install -y leafpad vim-gnome scribes gedit cream scite geany bluefish kwrite nedit tea
sudo apt-get install -y lyx
@achmadns
achmadns / jvm-setting.txt
Created Nov 19, 2015
Common jvm setting
View jvm-setting.txt
Proxy setting through jvm opts
-Dhttp.proxyHost=10.10.10.10 -Dhttp.proxyPort=3128 -Dhttp.nonProxyHosts=localhost|127.0.0.1
@achmadns
achmadns / git.sh
Last active Nov 17, 2015
Git related command
View git.sh
# push current branch into origin
git push origin `git status | grep branch | awk '{print $3}'`
# add all modified files
git status | grep modified | sed -re 's:^(.+\:)(.+):\2:' | xargs git add && git status
# list all project under specific group and grep the ssh url
curl --insecure -s "https://gitlab.com/api/v3/groups/oss?private_token=$GIT_TOKEN" | jq '.projects[].ssh_url_to_repo'
@achmadns
achmadns / sinopia-private-bower.json
Created Oct 10, 2015
PM2 config example for Sinopia and Private Bower.
View sinopia-private-bower.json
{
"apps" : [{
"name" : "sinopia",
"script" : "/home/achmad/.nvm/versions/node/v0.12.0/bin/sinopia",
"args" : [],
"watch" : false,
"node_args" : "",
"merge_logs" : true,
"env": {
}
View run-jenkin.sh
# simple example
java -Dcom.sun.akuma.Daemon=daemonized -jar /app/softwares/jenkins-1.613.war --daemon
# tuned jvm settings
nohup /app/.jenv/candidates/java/1.8.0_60/bin/java -Xms3G -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled -XX:-OmitStackTraceInFastThrow -Dcom.sun.akuma.Daemon=daemonized -jar /app/softwares/jenkins-1.613.war --daemon &> /dev/null &
You can’t perform that action at this time.