Skip to content

Instantly share code, notes, and snippets.

View rpfilomeno's full-sized avatar
💭
For Hire

Roger Filomeno rpfilomeno

💭
For Hire
View GitHub Profile
@rpfilomeno
rpfilomeno / php-docker-ext
Created August 8, 2022 10:48 — forked from hoandang/php-docker-ext
Complete list of php docker ext
RUN apt update
RUN apt upgrade -y
RUN apt install -y apt-utils
RUN a2enmod rewrite
RUN apt install -y libmcrypt-dev
RUN docker-php-ext-install mcrypt
RUN apt install -y libicu-dev
RUN docker-php-ext-install -j$(nproc) intl
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
@rpfilomeno
rpfilomeno / twitch_stream.sh
Created July 31, 2022 17:13 — forked from JPLeBreton/twitch_stream.sh
shell script for streaming to twitch.tv
#! /bin/bash
# from
# https://gist.github.com/3178130
# gist created by brodul
# modified for http://twitch.tv/jplebreton
# originaly from http://tinyurl.com/twitch-linux from taladan
# www.youtube.com/user/taladan
@rpfilomeno
rpfilomeno / ip_in_range.php
Created November 10, 2016 07:10 — forked from tott/ip_in_range.php
php check if IP is in given network range
/**
* Check if a given ip is in a network
* @param string $ip IP to check in IPV4 format eg. 127.0.0.1
* @param string $range IP/CIDR netmask eg. 127.0.0.0/24, also 127.0.0.1 is accepted and /32 assumed
* @return boolean true if the ip is in this range / false if not.
*/
function ip_in_range( $ip, $range ) {
if ( strpos( $range, '/' ) == false ) {
$range .= '/32';
}
# ~/.tmux.conf
# use UTF8
set -g utf8
set-window-option -g utf8 on
# make tmux display things in 256 colors
set -g default-terminal "screen-256color"
# set scrollback history to 10000 (10k)
set -g history-limit 30000
@rpfilomeno
rpfilomeno / Linux Static IP
Last active August 29, 2015 14:11 — forked from fernandoaleman/Linux Static IP
Linux Networking
## Configure eth0
#
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
NM_CONTROLLED="yes"
ONBOOT=yes
HWADDR=A4:BA:DB:37:F1:04
TYPE=Ethernet
BOOTPROTO=static
#!/bin/bash
## Copyright (C) 2009 Przemyslaw Pawelczyk <przemoc@gmail.com>
## License: GNU General Public License v2, v3
#
# Lockable script boilerplate
### HEADER ###
LOCKFILE="/var/lock/`basename $0`"