Skip to content

Instantly share code, notes, and snippets.

@cyppst
cyppst / deploy-laravel-2.sh
Created June 1, 2020 16:07 — forked from triswan/deploy-laravel-2.sh
Laravel Deployment
#!/bin/sh
#
## store the arguments given to the script
read oldrev newrev refname
## Where to store the log information about the updates
LOGFILE=./post-receive.log
# The deployed directory (the running site)
DEPLOYDIR=/home/swamedia/source/portal-elogistics

PLDT HOME FIBR AN5506-04-FA RP2616 Advanced Settings

By default the PLDT HOME FIBR AN5506-04-FA RP2616 comes only with limited settings.

Hidden from the web interface are the rest of the router's capabilities and advanced settings.

We just need to enter the right url for the settings you're looking for.

We need to be logged in before we can do anything else, use your defined password if you already set the admin password.

@cyppst
cyppst / install.sh
Created February 9, 2019 03:18 — forked from wdullaer/install.sh
Install Latest Docker and Docker-compose on Ubuntu
# Ask for the user password
# Script only works if sudo caches the password for a few minutes
sudo true
# Install kernel extra's to enable docker aufs support
# sudo apt-get -y install linux-image-extra-$(uname -r)
# Add Docker PPA and install latest version
# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9
# sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list"
@cyppst
cyppst / tightvncserver-setup-script.sh
Created December 4, 2018 23:45 — forked from daz/tightvncserver-setup-script.sh
Script to install VNC server and run at boot
# Setup VNC server
sudo apt-get install -y tightvncserver
mkdir -p "$HOME/.vnc"
vncpasswd -f <<< $PASSWORD > "$HOME/.vnc/passwd"
# VNC at startup
sudo tee /etc/init.d/tightvnc > /dev/null <<EOF
#!/bin/sh
@cyppst
cyppst / timestamp_version_bump.js
Created November 20, 2018 20:56
Apache Cordova build hook to auto bump iOS CFBundleVersion and Android versionCode
#!/usr/bin/env node
var fs = require("fs"),
path = require("path");
var rootdir = process.argv[2];
if (rootdir) {
module.exports = function(context) {
@cyppst
cyppst / docker-configure-tls.sh
Last active November 11, 2018 07:05 — forked from ivan-pinatti/docker-configure-tls.sh
Enable TLS in Docker service running in Ubuntu - #docker #docker-tls #tls #ubuntu
#!/usr/bin/env bash
: ' Script that enables TLS for Docker service in Ubuntu 16.x
This script is intended to be run as root
It;
- Generates the keys
- Creates the daemon.json Docker config file
@cyppst
cyppst / 01-docker-tls.sh
Created November 4, 2018 19:41 — forked from zigarn/01-docker-tls.sh
Generate Docker certificates for training on TLS
# Configuration
export PUBLIC_DNS=<public hostname>
export PUBLIC_IP=<public host IP>
export PRIVATE_IP=<private host IP>
mkdir docker-ca
chmod 0700 docker-ca/
cd docker-ca/
# CA key
#!/bin/bash
# Remove docker engine key to make it unique
sudo rm -f /etc/docker/key.json
sudo service docker restart
# Configure the docker daemon
sudo mkdir /etc/systemd/system/docker.service.d
cat << "EOF" > /etc/systemd/system/docker.service.d/daemon.conf
@cyppst
cyppst / .bashrc
Created November 4, 2018 04:28 — forked from miracle2k/.bashrc
Convert an existing docker container into a "docker run" command line
# Convert an existing docker container into a "docker run" command line.
#
# This is useful when trying to debug containers that have been created
# by orchestration tools.
#
# Install jq: stedolan.github.io/jq/
function format_run() {
cid=$1
@cyppst
cyppst / add_deploy_user.sh
Created October 26, 2018 09:41 — forked from kittolau/add_deploy_user.sh
Ubuntu 14.04 mangement Script
#!/bin/sh
sudo su
#============================
#Create deploy user
DEPLOY_USER=deploy
DEPLOY_USER_PASSWORD=deploy
#============================
#create deploy user
adduser --disabled-password --gecos "" ${DEPLOY_USER}
sudo adduser ${DEPLOY_USER} sudo