Skip to content

Instantly share code, notes, and snippets.

View sahibalejandro's full-sized avatar
😎
Doing cool stuff!

Sahib sahibalejandro

😎
Doing cool stuff!
View GitHub Profile
<button type="submit" :disabled="form.isPending">Submit</submit>
<template>
<form @submit.prevent="submit">
<input type="email" v-model="user.email"/>
</form>
</template>
<script>
import Form from 'form-object';
export default {
@sahibalejandro
sahibalejandro / vimrc
Last active March 24, 2017 17:42
vimrc file
"---------- Vundle {{{
set nocompatible
filetype off
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin() "Start Vundle plugins definition
Plugin 'VundleVim/Vundle.vim' "Vundle to manage Vimplugins
Plugin 'wincent/command-t' "Fast file navigation for VIM
@sahibalejandro
sahibalejandro / macvim-font-smoothing.sh
Last active December 15, 2016 22:59
MacVim font smoothing
defaults write org.vim.MacVim AppleFontSmoothing -int 0
@sahibalejandro
sahibalejandro / Emails.php
Created June 14, 2016 22:02
Trait for test emails using mailcatcher
<?php
namespace App\Testing;
use GuzzleHttp\Client;
trait Emails
{
/**
* Assert last email from mailcatcher is sent from a specified address.
@sahibalejandro
sahibalejandro / disable-font-smoothing.sh
Created February 29, 2016 06:57
Disable font smoothing for an app
defaults write org.vim.MacVim AppleFontSmoothing -int 0
@sahibalejandro
sahibalejandro / Uuid.php
Last active January 20, 2016 18:08
Uuid trait to use on eloquent models.
namespace App\Eloquent;
use Ramsey\Uuid\Uuid;
trait UuidField
{
/**
* Add a uuid to the model before persist to the data base.
*
* @param array $options
@sahibalejandro
sahibalejandro / timelapse.sh
Last active November 24, 2015 18:22
Create timelapse video with ffmpeg
ffmpeg -f image2 -start_number 170 -i G0010%03d.JPG -s 750x562 -pix_fmt yuv420p -r 60 tiendeme.mov
@sahibalejandro
sahibalejandro / LocaleAttributes.php
Created March 31, 2015 00:04
Laravel Model Locale Attributes
<?php
/**
* Author: Sahib J. Leo <sahib@sahib.io>
*
* Don't forget to add "model_fallback_locale" to your config/app.php
*
*/
namespace App\Support;
use App;
@sahibalejandro
sahibalejandro / sips
Created September 16, 2014 01:22
Scale images using sips
sips -Z <max_size> <file/files>