Skip to content

Instantly share code, notes, and snippets.

View apampolino's full-sized avatar

apampolino apampolino

  • Manila, Philippines
View GitHub Profile
@apampolino
apampolino / pldt_fiber_default_passwords.txt
Created April 1, 2021 03:37 — forked from earljon/pldt_fiber_default_passwords.txt
Default Admin Passwords for PLDT Fiber, Ultera and myDSL
PLDT myDSL, Fiber Home, ULTERA Username and Admin
Router: Fiberhome AN5506-04-FA PLDDTHOMEFibr modem
(debug switch)
(step1)
IP Address: 192.168.1.1/fh
Username: fiberhomesuperadmin
Password: sfuhgu
@apampolino
apampolino / 2019-https-localhost.md
Created May 9, 2020 11:31 — forked from cecilemuller/2019-https-localhost.md
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@apampolino
apampolino / ipv4-subnet.php
Created January 17, 2020 15:30
ipv4 subnet calculator
<?php
ini_set('display_errors', 1);
error_reporting(E_ALL);
function dump(...$var) {
echo "<pre style='background-color:000000; color:lime;'>";
foreach ($var as $key => $value) {
var_dump($value);
}
echo "</pre>";
@apampolino
apampolino / .htaccess-basic-auth-exclude-url
Created January 14, 2020 10:47 — forked from fmtarif/.htaccess-basic-auth-exclude-url
#htaccess HTTP Basic authentication excluding specific url
#for Apache 2.4
SetEnvIf Request_URI ^/tracking/logs auth=1
SetEnvIf Request_URI ^/anotherdir/logs auth=1
AuthName "Please login"
AuthType Basic
AuthUserFile "/srv/http/.htpwd"
# first, allow everybody
Order Allow,Deny
@apampolino
apampolino / update-vbox-add.sh
Last active March 7, 2019 08:04 — forked from fernandoaleman/gist:5083680
How to update VirtualBox Guest Additions with vagrant
# Start the old vagrant
$ vagrant init centos-6.3
$ vagrant up
# You should see a message like:
# [default] The guest additions on this VM do not match the install version of
# VirtualBox! This may cause things such as forwarded ports, shared
# folders, and more to not work properly. If any of those things fail on
# this machine, please update the guest additions and repackage the
# box.
@apampolino
apampolino / arch.txt
Created January 21, 2019 07:31
ArchLinux after installation
ARCHLINUX
# start dhcpd service
systemctl enable dhcpcd
# update mirrors
pacman-mirrors -g
# base base-devel
pacman -S --needed base-devel
@apampolino
apampolino / playsteam.sh
Created January 17, 2019 05:23
steam configuration on manjaro
#!/bin/bash
# uncomment for bumblebee
# vblank_mode=0 LD_PRELOAD='/usr/$LIB/libstdc++.so.6 /usr/$LIB/libgcc_s.so.1 /usr/$LIB/libxcb.so.1' optirun -b primus steam
# uncomment for optimus
vblank_mode=0 LD_PRELOAD='/usr/$LIB/libstdc++.so.6 /usr/$LIB/libgcc_s.so.1 /usr/$LIB/libxcb.so.1' steam
@apampolino
apampolino / intel.conf
Last active January 17, 2019 05:34
Manjaro Installation
Section "Device"
Identifier "intel"
Driver "modesetting"
BusID "00:02:0"
Option "DRI" "3"
EndSection
@apampolino
apampolino / helpers.php
Last active March 28, 2019 15:06
php helpers
<?php
const SECONDS_PER_YEAR = 31536000;
const SECONDS_PER_MONTH = 2592000;
const SECONDS_PER_WEEK = 604800;
const SECONDS_PER_DAY = 86400;
const SECONDS_PER_HOUR = 3600;
const SECONDS_PER_MINUTE = 60;
if (!function_exists('secondsToDay')) {
@apampolino
apampolino / MultiThreading.php
Last active November 8, 2018 16:00
PHP multithreading
<?php
class MultiThreading {
protected $function;
protected $data;
protected $process_ids;