Skip to content

Instantly share code, notes, and snippets.

View nurdiansyah's full-sized avatar
👨‍💻

Nurdiansyah nurdiansyah

👨‍💻
View GitHub Profile
@nurdiansyah
nurdiansyah / setEnv.sh
Created June 13, 2014 00:40
tomcat tuning
#! /bin/sh
# ==================================================================
# ______ __ _____
# /_ __/___ ____ ___ _________ _/ /_ /__ /
# / / / __ \/ __ `__ \/ ___/ __ `/ __/ / /
# / / / /_/ / / / / / / /__/ /_/ / /_ / /
#/_/ \____/_/ /_/ /_/\___/\__,_/\__/ /_/
# Multi-instance Apache Tomcat installation with a focus
# on best-practices as defined by Apache, SpringSource, and MuleSoft
@nurdiansyah
nurdiansyah / docker-cleanup-resources.md
Created June 29, 2017 04:07 — forked from bastman/docker-cleanup-resources.md
docker cleanup guide: containers, images, volumes, networks

Docker - How to cleanup (unused) resources

Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@nurdiansyah
nurdiansyah / ApacheHadoop_NativeLibs.adoc
Created July 7, 2017 05:33 — forked from zedar/ApacheHadoop_NativeLibs.adoc
Add native libraries to Apache Hadoop installation

Apache Hadoop - add native libraries

If native libraries are not available the following message is displayed with every hadoop command: hadoop checknative

WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
  • Clone hadoop source code


@nurdiansyah
nurdiansyah / after_res_hooks.js
Created July 27, 2017 11:53 — forked from pasupulaphani/after_res_hooks.js
Mongoose connection best practices
var db = mongoose.connect('mongodb://localhost:27017/DB');
// In middleware
app.use(function (req, res, next) {
// action after response
var afterResponse = function() {
logger.info({req: req}, "End request");
// any other clean ups
@nurdiansyah
nurdiansyah / difference.js
Created December 7, 2017 01:48 — forked from Yimiprod/difference.js
Deep diff between two object, using lodash
/**
* Deep diff between two object, using lodash
* @param {Object} object Object compared
* @param {Object} base Object to compare with
* @return {Object} Return a new object who represent the diff
*/
function difference(object, base) {
function changes(object, base) {
return _.transform(object, function(result, value, key) {
if (!_.isEqual(value, base[key])) {
@nurdiansyah
nurdiansyah / ArtistList.js
Created October 18, 2018 22:17 — forked from n1ru4l/ArtistList.js
mobx + apollo-client + react
import React from 'react'
import { observer } from 'mobx-react'
function ArtistList({ uiState: { artistData } }) {
const { data } = artistData;
if ( !data || !data.artists || !data.artists.length ) {
return <div>No artists bruh.</div>
}
const { artists } = data
return (
@nurdiansyah
nurdiansyah / wildcard-ssl-certificate.md
Created December 21, 2019 01:50 — forked from talyguryn/wildcard-ssl-certificate.md
How to get a wildcard ssl certificate and set up Nginx.

How to get and install a wildcard SSL certificate

In this guide you can find how to resolve the following issues.

Feel free to ask any questions in the comments section below.

@nurdiansyah
nurdiansyah / configs.js
Created December 30, 2019 21:53 — forked from DimitryDushkin/configs.js
React Native 0.57 + Babel 7 + Typescript + Jest
// babel.config.js
module.exports = {
"presets": [
"module:metro-react-native-babel-preset",
],
"plugins": [
["module-resolver", {
"root": ["./src"],
"extensions": [".js", ".ts", ".tsx", ".ios.js", ".android.js"]
}],
yum install -y yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
yum makecache fast
yum install -y docker-ce
chkconfig docker on
service docker start
## config firewall
# trust the docker interface
firewall-cmd --permanent --zone=trusted --change-interface=docker0
@nurdiansyah
nurdiansyah / 00_etc-hosts.md
Created January 28, 2020 03:12 — forked from mul14/00_etc-hosts.md
/etc/hosts for Vimeo, Netflix, Reddit, and Imgur.

Unblock Vimeo, Netflix, Reddit, dan Imgur

Saya support Internet Positif untuk memblokir porn, situs judi, dan hal-hal ilegal lainnya. Tapi pemerintah dan ISP sangat konyol karena tidak mengizinkan akses ke Vimeo, Reddit, Imgur, Netflix--yang mana bukanlah situs dengan konten utama ilegal.

Linux / BSD / macOS

Tambahkan list di bawah ke /etc/hosts.

Windows