Skip to content

Instantly share code, notes, and snippets.

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

rubemlrm rubemlrm

:octocat:
Focusing
View GitHub Profile
#!/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);
Verifying that +rubemlrm is my blockchain ID. https://onename.com/rubemlrm
@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:
@rubemlrm
rubemlrm / .vimrc
Created December 27, 2013 23:29 — forked from JeffreyWay/.vimrc
set nocompatible " Disable vi-compatibility
set t_Co=256
colorscheme xoria256
set guifont=menlo\ for\ powerline:h16
set guioptions-=T " Removes top toolbar
set guioptions-=r " Removes right hand scroll bar
set go-=L " Removes left hand scroll bar
set linespace=15
$(document).ready(function() {
$.get(BASE, function(data) {
$.each(data,function(key,value){
if(value.draft == 1){
var draft ='<span class="label label-success">Yes</span>';
}else{
var draft = '<span class="label label-important">No</span>';
}
This is one example to create one auto join script to irc .
<code>
on *:START:{
.server irc.tik-t0k.net:+6697 -i <nick>
.server -m irc.network -i <nick> (this is the syntax that you have to your script connect to other networks.)
}
on *:NOTICE:*This nickname is registered and protected*:*:{
if ($nick == NickServ && $network == TiK-T0K ) {
@rubemlrm
rubemlrm / article model.php
Created March 5, 2013 11:39
model for articles table
<?php
namespace Dojo\Models;
use \Laravel\Database\Eloquent\Model as Eloquent;
class Article extends Eloquent{
public static $timestamps = true;
public function author(){
return $this->belongs_to('Dojo\Models\User','author_id');
@rubemlrm
rubemlrm / gist:5089721
Created March 5, 2013 11:37
controller for articles
<?php
use Dojo\Models\Article, Dojo\Models\Tag;
class Dojo_Article_Controller extends Dojo_Base_Controller{
/**
* Get the list of articles to show in admin paneel , with optional sorting and filter search
* @param string $type type of filter (index/draft/published)
* @param string $id type of values we want search (all|0|1)