Skip to content

Instantly share code, notes, and snippets.

View rubemlrm's full-sized avatar
:octocat:
Focusing

rubemlrm rubemlrm

:octocat:
Focusing
View GitHub Profile
#!/bin/bash
resources=("ClusterRole" "Role" "Namespace")
for i in ${resources[@]} do;
done
@rubemlrm
rubemlrm / task.yml
Created June 29, 2021 09:10
ansible sssd task
---
- name: Install SSSD for active directory
ansible.builtin.package:
name: 'openssh-server'
state: present
with_items:
- realmd
- sssd
- oddjob
- oddjob-mkhomedir
@rubemlrm
rubemlrm / CheckNetworkMachines.pl
Created June 9, 2020 22:33
CheckNetworkMachines.pl
#!/usr/bin/perl
use warnings;
use strict;
use Net::Ping;
use autodie;
my $host;
my $my_addr="<ip>";
my $ping;
my @reportlist;
chomp(my $date = `date +%a%d%m%y%k%M`);
- name: Install base packages
become: true
become_user: root
become_method: sudo
package:
name: '{{ item }}'
state: present
with_items:
- 'youtube-dl'
- 'numlockx'
@rubemlrm
rubemlrm / gist:568b45e181333d306a8d21d413e31379
Created October 4, 2017 15:03
gitlab-ci multiple tasks
phpcs:
# This file is a template, and might need editing before it works on your project.
# Select image from https://hub.docker.com/_/php/
image: rubemlrm/php-docker:7.1-apache
# Select what we should cache between builds
cache:
paths:
- vendor/
# Apache Server Configs v2.11.0 | MIT License
# https://github.com/h5bp/server-configs-apache
# (!) Using `.htaccess` files slows down Apache, therefore, if you have
# access to the main server configuration file (which is usually called
# `httpd.conf`), you should add this logic there.
#
# https://httpd.apache.org/docs/current/howto/htaccess.html.
# ######################################################################
#!/usr/bin/perl
use warnings;
use strict;
use Data::Validate::IP qw(is_ipv4 is_ipv6);
use Data::Validate::Domain qw(is_domain);
#Global Vars
my $nfsconf = "/etc/exports";
&main();
#custom development
mariadb:
image: mariadb:latest
container_name: mariadb
env_file: ./database/.env
ports:
- "3306:3306"
volumes:
- /home/user/data/mariadb:/var/lib/mysql
public static function saveImage($file,$height = null, $width = "400"){
if ($file) {
$destinationPath = public_path() . '/uploads/images/';
$ext = $file->getClientOriginalExtension(); // Get real extension according to mime type
$fullname = $file->getClientOriginalName(); // Client file name, including the extension of the client
$hashname = md5($fullname . time()) . '.' .$ext; // Hash processed file name, including the real extension
$uploadSuccess = $file->move($destinationPath, $hashname);
@rubemlrm
rubemlrm / gist:63cd8eb7e9ba10b4319d
Created September 16, 2015 11:39
Gitlab-ci.yml
before_script:
- composer install --prefer-dist > /dev/null
- export APP_ENV=testing
unitTesting:
script:
- echo "Running PHP Unit tet"
- php vendor/bin/phpunit --colors --debug --coverage-text
codeSniffer:
script: