Skip to content

Instantly share code, notes, and snippets.

View dobbbri's full-sized avatar
🚀
Working from ISS/NASA

Sergio Dobri dobbbri

🚀
Working from ISS/NASA
View GitHub Profile
@dobbbri
dobbbri / crud.js
Created August 6, 2016 20:55 — forked from xtrasmal/crud.js
[WIP] - Vue.js Crud Mixin, adds create/read/update/delete etc methods to your component.
/**
* Crud Mixin
* Usage: Add this mixin to provide crud actions
*/
var Crud = {
data: function() {
return {
crud: null,
items: [],
@dobbbri
dobbbri / .vimrc
Created November 18, 2016 11:53 — forked from JeffreyWay/.vimrc
My .vimrc file
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
@dobbbri
dobbbri / brew-cask-upgrade.sh
Created February 5, 2017 21:07 — forked from n0ts/brew-cask-upgrade.sh
brew cask upgrade
#!/bin/bash
for c in $(brew cask list); do
info=$(brew cask info $c)
installed_ver=$(echo "$info" | cut -d$'\n' -f1 | tr -d ' ' | cut -d':' -f 2)
current_ver=$(echo "$info" | cut -d$'\n' -f3 | cut -d' ' -f 1 | rev | cut -d'/' -f 1 | rev)
if [ "$installed_ver" != "$current_ver" ]; then
echo "$c is installed '$installed_ver', current is '$current_ver'"
brew cask reinstall $c
fi
@dobbbri
dobbbri / brew-cask-upgrade.sh
Created February 5, 2017 21:07 — forked from n0ts/brew-cask-upgrade.sh
brew cask upgrade
#!/bin/bash
for c in $(brew cask list); do
info=$(brew cask info $c)
installed_ver=$(echo "$info" | cut -d$'\n' -f1 | tr -d ' ' | cut -d':' -f 2)
current_ver=$(echo "$info" | cut -d$'\n' -f3 | cut -d' ' -f 1 | rev | cut -d'/' -f 1 | rev)
if [ "$installed_ver" != "$current_ver" ]; then
echo "$c is installed '$installed_ver', current is '$current_ver'"
brew cask reinstall $c
fi
@dobbbri
dobbbri / dropdown.js
Created February 27, 2017 14:39
`v-dropdown` directive for Vue.js 2
/*
* @usage
*
* <div v-dropdown="{autoClose: true}">
* <button dropdown-toggle>Dropdown</button>
* <div class="dropdown-menu">
* This is the dropdown menu.
* </div>
* </div>
*
@dobbbri
dobbbri / index.html
Created June 27, 2017 01:42 — forked from deltaepsilon/index.html
Firebase 3.0 Authentication Demo
<!--
Install dependencies with Bower:
bower install PolymerElements/paper-elements#^1.0.7
-->
<html>
<head>
<title>Auth Example</title>
<link rel="shortcut icon" href="/favicon.png" type="image/x-icon">
@dobbbri
dobbbri / CatchAllOptionsRequestsProvider.php
Created October 27, 2017 03:08 — forked from danharper/CatchAllOptionsRequestsProvider.php
Lumen with CORS and OPTIONS requests
<?php namespace App\Providers;
use Illuminate\Support\ServiceProvider;
/**
* If the incoming request is an OPTIONS request
* we will register a handler for the requested route
*/
class CatchAllOptionsRequestsProvider extends ServiceProvider {
@dobbbri
dobbbri / vue.config.js
Created July 20, 2018 03:17 — forked from Akryum/vue.config.js
Auto-import styles with vue-cli 3
const path = require('path')
module.exports = {
chainWebpack: config => {
addStyleResource(config.module.rule('stylus').oneOf('vue-modules'))
addStyleResource(config.module.rule('stylus').oneOf('vue'))
addStyleResource(config.module.rule('stylus').oneOf('normal-modules'))
addStyleResource(config.module.rule('stylus').oneOf('normal'))
},
}
import Axios from 'axios'
state = {
todos : null
},
getters = {
TODOS : state => {
return state.todos;
}
},
@dobbbri
dobbbri / disable.sh
Created August 6, 2018 20:36 — forked from gopsmith/disable.sh
Disable bunch of #$!@ in Sierra (Version 2.1)
#!/bin/bash
# IMPORTANT: You will need to disable SIP aka Rootless in order to fully execute this script, you can reenable it after.
# WARNING: It might disable things that you may not like. Please double check the services in the TODISABLE vars.
# Get active services: launchctl list | grep -v "\-\t0"
# Find a service: grep -lR [service] /System/Library/Launch* /Library/Launch* ~/Library/LaunchAgents
# Agents to disable
TODISABLE=('com.apple.security.keychainsyncingoveridsproxy' 'com.apple.personad' 'com.apple.passd' 'com.apple.screensharing.MessagesAgent' 'com.apple.CommCenter-osx' 'com.apple.Maps.mapspushd' 'com.apple.Maps.pushdaemon' 'com.apple.photoanalysisd' 'com.apple.telephonyutilities.callservicesd' 'com.apple.AirPlayUIAgent' 'com.apple.AirPortBaseStationAgent' 'com.apple.CalendarAgent' 'com.apple.DictationIM' 'com.apple.iCloudUserNotifications' 'com.apple.familycircled' 'com.apple.familycontrols.useragent' 'com.apple.familynotificationd' 'com.apple.gamed' 'com.apple.icloud.findmydeviced.findmydevi