Skip to content

Instantly share code, notes, and snippets.

@Jrizzi1
Jrizzi1 / example.json
Created April 13, 2017 19:36
what the console log is dumping when seat selector is opening
{
"last_customer_stat_id": "8767",
"pano_seat": "~~57^153^4^190^1^ADA^30^30\n^ADA^1^1^243.308,631.771^1^30^ADA^0~58^153^4^190^1^ADA^30^30\n^ADA^2^2^254.416,631.771^1^30^ADA^0~59^153^4^190^1^ADA^30^30\n^ADA^3^3^266.855,631.771^1^30^ADA^0~60^153^4^190^1^ADA^30^30\n^ADA^4^4^277.963,631.771^1^30^ADA^0~61^153^4^190^1^ADA^30^30\n^ADA^5^5^290.344,631.771^1^30^ADA^0~62^153^4^190^1^ADA^30^30\n^ADA^6^6^301.453,631.771^1^30^ADA^0~63^153^4^190^1^ADA^30^30\n^ADA^7^7^313.574,631.771^1^30^ADA^0~64^153^4^190^1^ADA^30^30\n^ADA^8^8^324.682,631.771^1^30^ADA^0~65^153^4^190^1^ADA^30^30\n^ADA^9^9^337.189,631.771^1^30^ADA^0~66^153^4^190^1^ADA^30^30\n^ADA^10^10^348.297,631.771^1^30^ADA^0~67^153^4^190^1^ADA^30^30\n^ADA^11^11^360.491,631.771^1^30^ADA^0~68^153^4^190^1^ADA^30^30\n^ADA^12^12^371.599,631.771^1^30^ADA^0~69^153^4^190^1^ADA^30^30\n^ADA^13^13^384.201,631.771^1^30^ADA^0~70^153^4^190^1^ADA^30^30\n^ADA^14^14^395.309,631.771^1^30^ADA^0~71^153^4^190^1^ADA^30^30\n^ADA^15^15^408.1,631.771^1^30^ADA^0~72^153^4^190^1^ADA^30^30\n^ADA^
@Jrizzi1
Jrizzi1 / JSON Foster object
Last active August 29, 2015 14:00
JSON Foster encoded string
{
"animal": {
"bird": {
"properties": {
"huge beak": {
"type": "hookbill",
"compliments": "non-descript face"
},
"glasses": {
"type": "coke bottle",
@Jrizzi1
Jrizzi1 / Wirebox.cfc
Last active August 29, 2015 13:59
Wirebox mapping
<cfcomponent output="false" hint="The default WireBox Injector configuration object" extends="coldbox.system.ioc.config.Binder">
<cfscript>
/**
* Configure WireBox, that's it!
now where do i place this?
map('elasticsearch').to('model.elasticsearch').property(name='elasticsearchUrl', dsl='coldbox.setting:elasticsearchUrl');
*/
@Jrizzi1
Jrizzi1 / slugable.rb
Last active August 29, 2015 13:57
unique validation across models
module Slugable
extend ActiveSupport::Concern
included do
validates :slug, uniqueness: true, presence: true, exclusion: { in: %w[admin] }
before_validation :generate_slug
end
def link