Skip to content

Instantly share code, notes, and snippets.

View icasimpan's full-sized avatar

Ismael Casimpan Jr. icasimpan

View GitHub Profile
@icasimpan
icasimpan / pd-event.sh
Created March 30, 2021 20:53 — forked from alperkokmen/pd-event.sh
Simple script to trigger, acknowledge, and resolve incidents via PagerDuty Integration API.
#!/bin/bash
CONTENT_TYPE="application/json"
DESCRIPTION="bad things™ are happening"
URL="https://events.pagerduty.com/generic/2010-04-15/create_event.json"
if [ $# -ne 3 ]; then
echo "Usage: pd-event.sh [TYPE] [SERVICE KEY] [INCIDENT KEY]"
echo " - TYPE: [t]rigger | [a]cknowledge | [r]esolve"
echo " - SERVICE KEY: unique identifier for service"
@icasimpan
icasimpan / .gitignore
Created June 24, 2020 19:54 — forked from pdxjohnny/.gitignore
Setting Up k3s for Serverless (knative) on a $5 DigitalOcean Droplet Using k3d
.terraform/
*.pem
*.tf
*.tfstate
*.yaml
*.backup
istio-*/
cert-manager-*/
*.swp
env
@icasimpan
icasimpan / set-up-letsencrypt-acquia-stage.sh
Created June 20, 2020 01:46 — forked from alberto56/set-up-letsencrypt-acquia-stage.sh
Scripts semi-automating settings up LetsEncrypt for Acquia Stage environments (see http://blog.dcycle.com/blog/2018-10-05/https-acquia-stage/)
#!/bin/bash
#
# Script semi-automating the process of adding LetsEncrypt certificates to
# serve Acquia staging sites in HTTPS.
# See http://blog.dcycle.com/blog/2018-10-05/https-acquia-stage/
#
set -e
BASE="$PWD"
@icasimpan
icasimpan / install-gnu-sed-on-mac-osx.sh
Created May 12, 2020 06:26 — forked from andre3k1/install-gnu-sed-on-mac-osx.sh
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
@icasimpan
icasimpan / Ansible Let's Encrypt Nginx setup
Created December 27, 2018 21:19 — forked from mattiaslundberg/Ansible Let's Encrypt Nginx setup
Let's Encrypt Nginx setup with Ansible
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](https://www.ssllabs.com/).
To use:
1. Install [Ansible](https://www.ansible.com/)
2. Setup an Ubuntu 16.04 server accessible over ssh
3. Create `/etc/ansible/hosts` according to template below and change example.com 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)
@icasimpan
icasimpan / pldt-home-fibr-an5506-04-fa-rp2616-advanced-settings.md
Created May 31, 2018 13:03 — forked from kleo/backspace.md
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
icasimpan / drupalgeddon2_CVE-2018-7600_SA-CORE-2018-002.md
Created April 27, 2018 07:27 — forked from g0tmi1k/drupalgeddon2_CVE-2018-7600_SA-CORE-2018-002.md
drupalgeddon2 / SA-CORE-2018-002 / CVE-2018-7600 cURL (PoC)
@icasimpan
icasimpan / db-connect-test.php
Created December 28, 2017 15:26 — forked from chales/db-connect-test.php
Script for a quick PHP MySQL DB connection test.
<?php
# Fill our vars and run on cli
# $ php -f db-connect-test.php
$dbname = 'name';
$dbuser = 'user';
$dbpass = 'pass';
$dbhost = 'host';
$connect = mysql_connect($dbhost, $dbuser, $dbpass) or die("Unable to Connect to '$dbhost'");
@icasimpan
icasimpan / curl_custom_dns.sh
Created December 21, 2017 21:58 — forked from CMCDragonkai/curl_custom_dns.sh
cURL: Selecting a custom DNS server to resolve domain names
#!/usr/bin/env bash
# this can be useful when developing against a custom DNS server, or
# for example, if you made a change to the DNS settings of a domain, and you
# know the authoritative nameserver IP address for a domain, you could use this
# to bypass the intermediate DNS cache, and apply an HTTP request using the new
# DNS settings supplied by your specified (authoritative) nameserver
curl --dns-servers <dns.ip,dns.ip> url.com
@icasimpan
icasimpan / pedantically_commented_playbook.yml
Created November 23, 2017 14:41 — forked from marktheunissen/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
---
# ^^^ YAML documents must begin with the document separator "---"
#
#### Example docblock, I like to put a descriptive comment at the top of my
#### playbooks.
#
# Overview: Playbook to bootstrap a new host for configuration management.
# Applies to: production
# Description:
# Ensures that a host is configured for management with Ansible.