Skip to content

Instantly share code, notes, and snippets.

Avatar

Anthony Gore anthonygore

View GitHub Profile
@brianboyko
brianboyko / README.md
Last active May 10, 2020
Vue Extended Styleguide for Vue-Function-API / Vue 3.0 Proposal
View README.md

Important: This is in the RFC stage. Please comment if you notice typos, code flaws, or even disagree with the conclusions.

I'm still getting used to vue-function-api and haven't had a chance to try it out extensively. In other words, I might be completely wrong on everything. That's okay.

Brian Boyko's Vue.js Style Guide for use with the Vue-Function-API

Guide for developing Vue.js applications for the proposed Vue 3 function API (or the vue-function-api plugin).


@jhoff
jhoff / Enums.php
Last active Feb 24, 2021
Laravel Model Enumeration Trait
View Enums.php
<?php
namespace App\Traits;
use Illuminate\Support\Str;
use App\Exceptions\InvalidEnumException;
trait Enums
{
/**
@anthonygore
anthonygore / slack.js
Last active Aug 12, 2017
Send users a welcome message (IM) from the slackbot when they join your Slack team. Uses https://github.com/smallwins/slack so look at that first. Load this somewhere in a running Node JS app.
View slack.js
var slack = require('slack');
var bot = slack.rtm.client();
var token = "your_slack_token";
bot.team_join(function(obj) {
console.log("Team join triggered");
slack.chat.postMessage(
{
token: token,
channel: obj.user.id,
@timstermatic
timstermatic / gist:6163577
Last active Jul 31, 2016
Async unique validation with expressjs and mongoose
View gist:6163577
var mongoose = require('mongoose')
,Schema = mongoose.Schema
,ObjectId = Schema.ObjectId;
var userSchema = new Schema({
email: String,
password: String,
View jquery_autocomplete.html
<!DOCTYPE html>
<html>
<head>
<title>jQuery Autocomplete</title>
<style>
#res {
margin: 0px;
padding-left: 0px;
width: 150px;
}