Skip to content

Instantly share code, notes, and snippets.

View naaando's full-sized avatar
🏠
Working from home

Fernando da Silva Sousa naaando

🏠
Working from home
View GitHub Profile
@zerodahero
zerodahero / EmailRequest.php
Created December 20, 2017 15:23
Laravel 5.4 Comma Separated Email Validation (Transforming Data)
<?php
namespace App\Http\Requests;
use Illuminate\Foundation\Http\FormRequest;
class EmailRequest extends FormRequest
{
/**
* Determine if the user is authorized to make this request.
Mi lista de repos flatpak
Flathub:
flatpak remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
Gnome Stable:
flatpak remote-add --if-not-exists gnome https://sdk.gnome.org/gnome.flatpakrepo
flatpak remote-add gnome-apps https://sdk.gnome.org/gnome-apps.flatpakrepo
@mariocesar
mariocesar / app_granite.py
Last active June 29, 2021 08:35
Python GTK3 desktop app and Granite App (Elementary OS Desktop)
import sys
from gi.repository import Granite
from gi.repository import Gtk
from gi.repository import Gio
class LightWindow(Gtk.Dialog):
def __init__(self):
super(LightWindow, self).__init__()
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@oparrish2
oparrish2 / create-swap.sh
Created November 11, 2011 18:08
Script for creating a filesystem swap file on Linux
#!/bin/bash
SWAP_SIZE_MEGABYTES=$1
if [ $SWAP_SIZE_MEGABYTES -eq 0 ];then
echo No swap size given, skipping.
else
if [ -e /swapfile ];then
echo /swapfile already exists, skiping.
else
echo Creating /swapfile of $SWAP_SIZE_MEGABYTES Megabytes
dd if=/dev/zero of=/swapfile bs=1024 count=$(($SWAP_SIZE_MEGABYTES*1024))