Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
exploring

Elmer Rivera elmer

:octocat:
exploring
View GitHub Profile
@elmer
elmer / oauth-client.rb
Created September 14, 2022 00:07 — forked from dagingaa/oauth-client.rb
A minimal Sinatra OAuth 2.0 client and resource server.
View oauth-client.rb
require 'sinatra'
require 'open-uri'
require 'json'
# This application is the bare minimum to authorize with OAuth 2.0
# using the authorization grant scheme. No error handling included.
# The application is both a client and a resource server.
# Start it by using 'ruby <file>' and navigate to http://localhost:4567
#
# The application also needs the oauth-server written in Java.
@elmer
elmer / GetNordVPNWireGuardDetails.md
Created March 9, 2022 04:57 — forked from bluewalk/GetNordVPNWireGuardDetails.md
Getting NordVPN WireGuard details
View GetNordVPNWireGuardDetails.md
@elmer
elmer / RESEARCH_NANO_G.md
Created December 11, 2020 10:42 — forked from thomasgroch/RESEARCH_NANO_G.md
UFiber Nano G Research
View RESEARCH_NANO_G.md
@elmer
elmer / unmarshal_user.go
Created October 26, 2019 12:15 — forked from lachlan-eagling/unmarshal_user.go
Blog - Anatomy of a Struct (Unmarshaling)
View unmarshal_user.go
package main
import (
"encoding/json"
"fmt"
)
type User struct {
FirstName string `json:"firstName"`
LastName string `json:"surname"`
@elmer
elmer / prometheus-metrics-golang.go
Created September 17, 2019 05:15 — forked from sysdig-blog/prometheus-metrics-golang.go
Prometheus metrics code instrumentation in Golang
View prometheus-metrics-golang.go
package main
import (
"net/http"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promhttp"
"log"
"time"
"math/rand"
@elmer
elmer / cassandra.service
Created February 6, 2018 18:43 — forked from tobert/cassandra.service
A systemd unit for Cassandra
View cassandra.service
[Unit]
Description=Cassandra
After=network.target
[Service]
Type=forking
PIDFile=/var/lib/cassandra/cassandra.pid
User=cassandra
Group=cassandra
ExecStart=/usr/bin/cassandra -p /var/lib/cassandra/cassandra.pid
@elmer
elmer / pldt-home-fibr-an5506-04-fa-rp2616-advanced-settings.md
Created February 6, 2018 16:42 — forked from kleo/backspace.md
PLDT HOME FIBR AN5506-04-FA RP2616 Advanced Settings
View pldt-home-fibr-an5506-04-fa-rp2616-advanced-settings.md

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.

View gist:fcc58414a3034b7166a8fbc6804bf675
# basic pfctl control
# ==
# Related: http://www.OpenBSD.org
# Last update: Tue Dec 28, 2004
# ==
# Note:
# this document is only provided as a basic overview
# for some common pfctl commands and is by no means
# a replacement for the pfctl and pf manual pages.
View spec_helper-additions
# Add fixture lib dirs to LOAD_PATH. Work-around for PUP-3336
#
if Puppet.version < "4.0.0"
Dir["#{fixture_path}/modules/*/lib"].entries.each do |lib_dir|
$LOAD_PATH << lib_dir
end
end
View gist:195a5fc1cc7459c82aba
in puppet.conf add (not needed in recent puppet versions, 3.5+ or something):
cadir = $ssldir/ca { mode = 775 }
cacert = $cadir/ca_crt.pem { mode = 664 }
csrdir = $cadir/requests { mode = 775 }
signeddir = $cadir/signed { mode = 775 }
in apache site add (change /etc/puppet/ssl to your ssldir path):