Skip to content

Instantly share code, notes, and snippets.

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

rubemlrm rubemlrm

:octocat:
Focusing
View GitHub Profile
@rubemlrm
rubemlrm / first version
Created December 8, 2011 11:21
archlinux setup script
#!/bin/sh
echo "Scripting to do a clean install and openbox install for archlinux"
while :
do
clear
echo "Choose a option"
echo "1-Setup the basic functions like adduser / install sound/video drivers"
echo "2-Setup keyboard layout / install dbus / drivers/ xterm and test X"
@rubemlrm
rubemlrm / setup_adb.pl
Last active September 29, 2015 06:48
setup_adb
#!/usr/bin/perl -w
#Developer by : Rubem Mota
#Dont use to earn money and keep all copyrights reserved to me
#Twitter: @rubemlrm
use strict;
chomp(my @rules = (
'SUBSYSTEM=="usb", SYSFS{idVendor}=="0502", MODE="0666"',
'SUBSYSTEM=="usb", SYSFS{idVendor}=="413c", MODE="0666"',
'SUBSYSTEM=="usb", SYSFS{idVendor}=="0489", MODE="0666"',
'SUBSYSTEM=="usb", SYSFS{idVendor}=="091E", MODE="0666"',
@rubemlrm
rubemlrm / gist:2292206
Last active October 2, 2015 18:08
Check Network machines
#!/usr/bin/perl
package networking;
use warnings;
use strict;
use Net::Ping;
use autodie;
my $host;
my $my_addr="<ip>";
my $ping;
my @reportlist;
@rubemlrm
rubemlrm / gist:3387796
Last active October 8, 2015 20:57
Script do manage Apache virtualHosts
#!/usr/bin/perl
use warnings;
use strict;
my $userhome = "nome de utilizador";
######################################################
# Script para gerir VirtualHosts no Apache #
# #
# Permite adicionar , remover , verificar , listar, #
# desactivar os vhosts que temos na mossa máquina. #
# #
@rubemlrm
rubemlrm / .tmux.conf
Created November 9, 2012 17:18 — forked from paulrouget/.tmux.conf
Paul's configurations files
set -g default-terminal "screen-256color"
set -g status-utf8 on
bind M source-file ~/.tmux/mac.session
bind L source-file ~/.tmux/linux.session
# set -g terminal-overrides 'xterm*:smcup@:rmcup@'
# THEME
set -g status-bg black
@rubemlrm
rubemlrm / laravel-ums.markdown
Created December 8, 2012 18:44 — forked from anchetaWern/laravel-ums.markdown
Building a User Management System in Laravel

There's no shortage of good resources for learning laravel. So instead of the usual introductory tutorial were just gonna learn Laravel by building a project from scratch and that's gonna be a User Management System.

I don't know if my definition of a User Management System is correct but here's my idea of what's it's capable of doing:

  • Register Roles
  • Register Users
  • Update Users
@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)
@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');
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 ) {
$(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>';
}