Skip to content

Instantly share code, notes, and snippets.


Ismael Casimpan icasimpan

View GitHub Profile
icasimpan / .gitignore
Created Jun 24, 2020 — forked from pdxjohnny/.gitignore
Setting Up k3s for Serverless (knative) on a $5 DigitalOcean Droplet Using k3d
View .gitignore
icasimpan /
Created Jun 20, 2020 — forked from alberto56/
Scripts semi-automating settings up LetsEncrypt for Acquia Stage environments (see
# Script semi-automating the process of adding LetsEncrypt certificates to
# serve Acquia staging sites in HTTPS.
# See
set -e
icasimpan /
Created May 12, 2020 — forked from andre3k1/
How to install gnu sed on Mac OS X and set it as the default
# Check which version of sed is used when you run the `sed` command
# The version that ships with Mac OS X is
# /usr/bin/sed
which sed
# Install gnu-sed using Homebrew
# The `--with-default-names` option configures `sed` to use gnu-sed
# Without that option, you'll need to type `gsed` to use gnu-sed
brew install --default-names gnu-sed
View Ansible Let's Encrypt Nginx setup
Ansible playbook to setup HTTPS using Let's encrypt on nginx.
The Ansible playbook installs everything needed to serve static files from a nginx server over HTTPS.
The server pass A rating on [SSL Labs](
To use:
1. Install [Ansible](
2. Setup an Ubuntu 16.04 server accessible over ssh
3. Create `/etc/ansible/hosts` according to template below and change to your domain
4. Copy the rest of the files to an empty directory (`playbook.yml` in the root of that folder and the rest in the `templates` subfolder)
View jenkins-log-parser+verifier.txt
View apache-long-directory-listing.txt
IndexOptions NameWidth=*
Something like below:
</VirtualHost *:80>
<Directory "/var/www/sites/RELEASES">
Options +Indexes +FollowSymLinks
icasimpan /
Created Jun 29, 2018
POC shell script for keeping only the last 30 files. Useful for archives.
cd /var/backup/files
let count=1
for each_file in $(ls -1t); do
if [ $count -le 30 ]; then
echo "[$each_file] - good"
let count=$count+1
icasimpan / sudo-exec
Created Jun 15, 2018
Running a command as another user without shell
View sudo-exec
sudo su apache -s /bin/bash -c 'touch testing'
icasimpan /
Created May 31, 2018 — forked from kbeflo/
PLDT HOME FIBR AN5506-04-FA RP2616 Advanced Settings

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.

icasimpan /
Created Apr 27, 2018
DIY simple uptime checker via shell
### Credentials file '/home/user/.credentials.txt for additional protection be chmod to 600.
### Sample creds content:
### --user youruser:password_here
### This could then be run from cron every 15mins:
### */15 * * * * /home/user/