Skip to content

Instantly share code, notes, and snippets.

Avatar
🚀
Coding all the things

Tim Badolato timsayshey

🚀
Coding all the things
View GitHub Profile
View FormFields.vue
<template lang="pug">
.mb-2.mt-5(:data-type='type')
div(v-if='type === "html"', v-html='html')
div(v-else-if='type === "checkbox"')
label {{ label }}
input(
type='checkbox',
:checked='inputValue',
@input='updateCheckbox($event.target.checked)'
)
@timsayshey
timsayshey / index.cfm
Created Feb 14, 2021 — forked from bennadel/index.cfm
Scaling An Image During A Draw Operation Using GraphicsMagick And Lucee CFML 5.2.9.31
View index.cfm
<cfscript>
param name="url.image" type="string" default="beach-small.jpg";
startedAt = getTickCount();
// CAUTION: For the sake of the demo, I am not validating the input image. However,
// in a production setting, I would never allow an arbitrary filepath to be provided
// by the user! Not without some sort of validation.
inputFilename = url.image;
View gist:b0e11850b10f01b3cfa4b75dda4f4e98
# Requires bash tool jq for json parsing - brew install jq
# Random Bible Verse
# https://beta.ourmanna.com/api/v1/get?format=json&order=random
# https://beta.ourmanna.com/api/v1/get?format=json
curl --max-time 2 -s https://beta.ourmanna.com/api/v1/get\?format\=json\&order\=random \
| jq --raw-output '"👉 ",.verse.details.text," - ",.verse.details.reference," 💯 "' | tr -d '\n'
echo
echo
View keybase.md

Keybase proof

I hereby claim:

  • I am timsayshey on github.
  • I am timsayshey (https://keybase.io/timsayshey) on keybase.
  • I have a public key ASCHHiFiRvULF_WvGY8N6RXiWqDNdEi8hNVV4vROYk1tIAo

To claim this, I am signing this object:

@timsayshey
timsayshey / wp-shortcodes.go
Last active Feb 28, 2018
Wordpress Shortcodes in Golang
View wp-shortcodes.go
package main
import (
"fmt"
"io/ioutil"
"net/http"
"regexp"
"strconv"
"strings"
)
@timsayshey
timsayshey / lambda-twilio-slack-funtimes.js
Last active Feb 3, 2017
Slack slash command to Lambda Twilio SMS Message
View lambda-twilio-slack-funtimes.js
// Credit: Charlie & Tim
// Go to AWS API Gateway
// Add Resource, then add a GET method with a node js lambda function (paste the code from below in)
// Add an integration template to the API Gateway resource to allow the 'text' url param from Slack
var https = require( "https" );
var querystring = require( "querystring" );
exports.handler = function( event, context, callback ) {
var data = event.text.split(" ");
@timsayshey
timsayshey / CFWheels Model Logger
Last active Dec 31, 2015
CFWheels Model Logger
View CFWheels Model Logger
This will let you log every time a user inserts or updates a record.
So you can later say:
Tim performed insert to the "25" record in the Page table via Pages' Edit a few hours ago, etc
Create a table called Logs with the following columns:
id int primary autoinc
userid int
modelid varchar
savetype varchar
@timsayshey
timsayshey / Shop.cfc
Created Jul 27, 2012
Model or Conroller or Service or ???
View Shop.cfc
<cfscript> //Needed for code coloring
/**
* @hint This is the Shop controller which handles the shopping cart
*/
component extends="Controller" {
/**
* @hint Runs before functions
*/
public function init()
@timsayshey
timsayshey / itemBean.cfc
Created Jun 19, 2012
Coldbox itemBean & itemGateway
View itemBean.cfc
<cfcomponent output="false" cache="true">
<cfscript>
_datasource = 0;
_itemGW = 0;
item.id = 0;
item.code = "";
item.name = "";
item.BookXML = "";
item.description = "";