Skip to content

Instantly share code, notes, and snippets.

View andybellenie's full-sized avatar

Andrew Bellenie andybellenie

View GitHub Profile
@andybellenie
andybellenie / Users.cfc
Created June 7, 2018 10:28
CFWheels datatables example
<cfcomponent extends="Controller">
<cffunction name="index">
<cfif params.format eq "json">
<!--- create the where clause for all searchable fields--->
<cfset where = "">
<cfif Len(params.search.value)>
<cfset where = "id = #Val(params.search.value)#
error: linking with `cc` failed: exit code: 1
|
= note: "cc" "-Wl,--as-needed" "-Wl,-z,noexecstack" "-m64" "-L" "/home/ubuntu/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-unknown-linux-gnu/lib" "/home/ubuntu/grin/target/debug/deps/grin-7fb19a392d8d2d4c.0.o" "-o" "/home/ubuntu/grin/target/debug/deps/grin-7fb19a392d8d2d4c" "/home/ubuntu/grin/target/debug/deps/grin-7fb19a392d8d2d4c.crate.allocator.o" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-nodefaultlibs" "-L" "/home/ubuntu/grin/target/debug/deps" "-L" "/home/ubuntu/grin/target/debug/build/secp256k1zkp-b3b003e2abd91d5d/out" "-L" "/home/ubuntu/grin/target/debug/build/librocksdb-sys-2d5f0bce0c98668d/out" "-L" "/home/ubuntu/grin/target/debug/build/librocksdb-sys-2d5f0bce0c98668d/out" "-L" "/home/ubuntu/grin/target/debug/build/cuckoo_miner-d3eddbfb5905c5e5/out" "-L" "/home/ubuntu/grin/target/debug/build/rust-crypto-c61e52eda4d55a33/out" "-L" "/home/ubuntu/grin/target/debug/build/secp256k1zkp-02b4b7d4aa5f4ced/out" "-L" "/home/ub
Verifying that "awbellenie.id" is my Blockstack ID. https://onename.com/awbellenie
@andybellenie
andybellenie / Campaign Contacts
Last active December 22, 2015 16:19
SQL query to optimize
SELECT *
FROM (
SELECT TOP 1000
sc.contactId, con.companyId, con.firstName, con.lastName, con.firstName + ' ' + con.lastName AS fullName, con.jobTitle, con.socCode,
con.primaryEmail, con.secondaryEmail, con.telDirect, con.telHome, con.telMobile,
cmp.name AS company, cmp.tradingAs, cmp.telMain, cmp.address1, cmp.address2, cmp.address3, cmp.city, cmp.postcode, cmp.naicsCode,
cmp.countryCode, cmp.regionCode, cty.name AS country, cmp.industry, cmp.state, cmp.localSize, cmp.globalSize,
mostRecent.id AS lastDialId, mostRecent.createdAt AS lastDialAt, mostRecent.outcomeCode, mostRecent.createdBy AS lastDialBy, mostRecent.blacklistId,
o.label AS outcomeLabel, o.isConnect, o.isLead, o.reattempt, bl.label AS blacklistLabel,
@andybellenie
andybellenie / association.cfm
Created May 23, 2012 12:11 — forked from KrunchMuffin/association.cfm
cfwheels association help
<!--- pet model --->
<cfcomponent extends="Model" output="false">
<cffunction name="init" output="false" access="public">
<!--- relationships --->
<cfset hasOne(name="petProfile", jointType="outer")>
<cfset hasMany(name="petDocuments", dependent="deleteAll", jointType="outer")>
<cfset belongsTo(name="personPet")>
<cfset hasMany(name="petEvents", dependent="deleteAll", jointType="outer")>
<cfset hasMany(name="ViewPetEvents", foreignkey="petid", jointType="outer")>