Skip to content

Instantly share code, notes, and snippets.

View yelvert's full-sized avatar

Taylor Yelverton yelvert

  • VitalEngine
  • Alabama
View GitHub Profile
version: "3.7"
services:
project-zomboid:
image: ghcr.io/cyrale/project-zomboid
restart: unless-stopped
environment:
SERVER_NAME: "pzserver"
ADMIN_PASSWORD: "pzserver-password"
ports:
@yelvert
yelvert / 11.rb
Last active October 4, 2018 05:03
Project Euler
#######################################
# https://projecteuler.net/problem=11 #
#######################################
GRID = "08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08
49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 62 00
81 49 31 73 55 79 14 29 93 71 40 67 53 88 30 03 49 13 36 65
52 70 95 23 04 60 11 42 69 24 68 56 01 32 56 71 37 02 36 91
22 31 16 71 51 67 63 89 41 92 36 54 22 40 40 28 66 33 13 80
24 47 32 60 99 03 45 02 44 75 33 53 78 36 84 20 35 17 12 50
@yelvert
yelvert / dsl.rb
Last active September 26, 2018 01:36
DSL Example
#! /usr/bin/env ruby
module SomeMod
module DSL
def self.included(base)
base.extend ClassMethods
end
@yelvert
yelvert / app.html
Created February 12, 2015 04:44
AuClass
<template>
<import from="./class" as="au-class"></import>
<section>
<div au-class.bind="myClasses">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
@yelvert
yelvert / app.html
Created February 11, 2015 02:25
angular style expression locals
<template>
<button click.delegate="clickHandler1($event)"></button>
<button click.delegate="clickHandler2(myVar, $event)"></button>
<typeahead select.delegate="selectItem1($item)"></typeahead>
<typeahead select.delegate="selectItem2(myVar, $item)"></typeahead>
</template>
@yelvert
yelvert / app.js
Last active August 29, 2015 14:14
Aurelia Redirect Fail
import {Router} from 'aurelia-router'
export class App {
static inject () { return [Router] }
constructor (router) {
this.router = router
this.router.configure(config => {
config.title = "SampleApp"
config.map([
@yelvert
yelvert / gist:3f536e690c7c1f419334
Created September 2, 2014 07:20
Angular resource/api combination
(function() {
'use strict';
angular.module('someModule').factory('SomeResource', [
'$http',
function ($http) {
return $http.get('http://example.com/some_resources').then(function (res) {
return res.data;
});
}
@yelvert
yelvert / gist:36747991a623268b9b03
Created September 2, 2014 07:14
Angular Resource factory with an API
(function() {
'use strict';
angular.module('someModule').factory('SomeResource', [
'$http',
function ($http) {
$http.get('http://example.com/some_resources').then(function (res) {
var resources = res.data;
return resourceFactory = {
all: function (){
@yelvert
yelvert / gist:d9095460e5492e0f2d04
Last active August 29, 2015 14:05
Simple Angular resource factory
(function() {
'use strict';
angular.module('someModule').factory('SomeResource', [
'$http',
function ($http) {
return $http.get('http://example.com/some_resources').then(function (res) {
return res.data;
});
}
Document.where('created_at > "2012-1-1 00:00:00"').order('created_at').as_batches(batch_size: 200) do |yolo|
yolo.create_or_set_patient && yolo.save rescue next
end;nil