Skip to content

Instantly share code, notes, and snippets.

View nethoncho's full-sized avatar
🍊

Net Honcho nethoncho

🍊
View GitHub Profile
@nethoncho
nethoncho / use_wnameless_oracle-xe-11g.md
Created April 14, 2018 01:54 — forked from ochinchina/use_wnameless_oracle-xe-11g.md
how to use wnameless/oracle-xe-11g docker image

##pull wnameless/oracle-xe-11g

$ sudo docker pull wnameless/oracle-xe-11g

##start the wnameless/oracle-xe-11g

$ sudo docker run -d -p 49160:22 -p 49161:1521 wnameless/oracle-xe-11g
@nethoncho
nethoncho / README.md
Created March 22, 2018 09:07 — forked from ErisDS/README.md
Deployment tools for Ghost themes

Gulp tools to deploy a Ghost theme

To set it up:

  • copy gulp-config.json.example to gulp-config.json
  • enter the blog admin url, no trailing slash, e.g. https://myblog.ghost.io
  • grab the client secret for the frontend from the source of any page of the blog
  • enter the email address & password you use to login to the blog (must be administrator-level)

To deploy:

@nethoncho
nethoncho / README.md
Created December 26, 2017 14:28 — forked from brattonc/README.md
D3 Liquid Fill Gauge

Liquid Fill Gauge v1.1 - 7/14/2015

Changes:

  • Added support for updating the gauge value after loading is complete. The loadLiquidFillGauge method now returns an object with an update method which allows the gauge value to be changed. Click any of the gauges above to randomly update their value.

Configurable features include:

  • Changeable min/max values.
  • All colors.
@nethoncho
nethoncho / raspbian-list-open-ports.sh
Last active February 22, 2023 14:29
Raspberry Pi Raspbian list open ports
netstat -lnt | grep LISTEN | awk '{ print ( $4 ) }' | awk 'BEGIN{FS=":"} { print $(NF) }' | sort -n | uniq
@nethoncho
nethoncho / pm2-ipc.js
Created December 15, 2017 14:28
pm2 IPC Minimum needed to send message to process
/*
The online documents were not very clear.
http://pm2.keymetrics.io/docs/usage/pm2-api/#send-message-to-process
https://stackoverflow.com/a/35504369/3386260
https://github.com/pm2-hive/pm2-hive.github.io/pull/117
*/
// Sender
// The sender can run inside or outside of pm2
var pm2 = require('pm2');
@nethoncho
nethoncho / sysv.init.script.to.systemd.unit.file.md
Created December 13, 2017 07:07 — forked from houtianze/sysv.init.script.to.systemd.unit.file.md
Convert SysV Init scripts to Systemd Unit File

Let's say you have a SysV Init Script named foo

  1. Copy the file to /etc/init.d/foo

  2. Enable the SysV service: chkconfig --add foo

  3. Enable the SysV service: chkconfig foo on

  4. Start the service: service foo start. After this, systemd-sysv-generator will generate this file /run/systemd/generator.late/foo.service, copy this file to /etc/systemd/system by running: cp /run/systemd/generator.late/foo.service /etc/systemd/system/foo.service

  5. Edit /etc/systemd/system/foo.service by running systemctl edit foo.service, add in the following line to foo.servie (this makes the service installable)

[Install]

@nethoncho
nethoncho / LICENSE
Last active December 20, 2017 14:52 — forked from rkirsling/LICENSE
Trend Chart (Area + Line)
Copyright (c) 2014 Ross Kirsling
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
@nethoncho
nethoncho / ! Ubuntu nginx meteor proxy
Last active October 27, 2017 04:18
Meteor nginx application proxy on Ubuntu 16.04.3 LTS
# Use sudo before each command if not logged in as root
#
# Install nginx https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-16-04
apt-get update
apt-get install nginx
# Check that HTTP port 80 and HTTPS port 443 are open
ufw app status
# Make sure nginx starts on boot
@nethoncho
nethoncho / ! pg-migrate-demo
Last active October 25, 2017 03:27
Postgresql database migration management
# https://github.com/salsita/node-pg-migrate
npm install node-pg-migrate
/*
* config/bootstrap.js
* Example of how to redirect all http request to https
* See http://jsbot.io/node/http-and-https-handle-with-sailsjs
*
*/
module.exports.bootstrap = function(cb) {
var express = require("express")
var app = express();