This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function objectToKeyPaths( { data, parentKey='', separator='__' } ) { | |
| const result = Object | |
| .entries( data === undefined || data === null ? {} : data ) | |
| .reduce( ( acc, [ key, value ], index ) => { | |
| const currentKey = parentKey ? `${parentKey}${separator}${key}` : key; | |
| if( typeof data[ key ] === 'object' && !Array.isArray( data[ key ] ) ) { | |
| const _next = objectToKeyPaths( { | |
| 'data': data[ key ], | |
| 'parentKey': currentKey, | |
| separator |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { | |
| Field, | |
| SmartContract, | |
| state, | |
| State, | |
| method, | |
| } from 'snarkyjs'; | |
| export class Square extends SmartContract { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const crypto = require( 'crypto' ) | |
| const Cryption = class Cryption { | |
| #state | |
| constructor() { | |
| this.config = { | |
| 'algorithm': 'aes-256-cbc' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ^B62[a-km-zA-HJ-NP-Z1-9]{52}$ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const webhookUrl = "https://..." | |
| const { recordId } = input.config() | |
| const response = await fetch( `${webhookUrl}?recordId=${recordId}` ) | |
| console.log( response.status ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require "uri" | |
| require "net/http" | |
| require 'active_support/core_ext/hash/indifferent_access' | |
| require 'json' | |
| class EasyAirtable | |
| def initialize() | |
| @config = { | |
| url: 'https://api.airtable.com/v0/' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const htmlColors = { | |
| 'AliceBlue': '#F0F8FF', 'AntiqueWhite': '#FAEBD7', | |
| 'Aqua': '#00FFFF', 'Aquamarine': '#7FFFD4', | |
| 'Azure': '#F0FFFF', 'Beige': '#F5F5DC', | |
| 'Bisque': '#FFE4C4', 'Black': '#000000', | |
| 'BlanchedAlmond': '#FFEBCD', 'Blue': '#0000FF', | |
| 'BlueViolet': '#8A2BE2', 'Brown': '#A52A2A', | |
| 'BurlyWood': '#DEB887', 'CadetBlue': '#5F9EA0', | |
| 'Chartreuse': '#7FFF00', 'Chocolate': '#D2691E', | |
| 'Coral': '#FF7F50', 'CornflowerBlue': '#6495ED', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'nokogiri' | |
| require 'time' | |
| def generateAtomFeed( data: nil ) | |
| builder = Nokogiri::XML::Builder.new( encoding: 'utf-8' ) | |
| builder.feed( | |
| 'xmlns': 'http://www.w3.org/2005/Atom', | |
| 'xmlns:dc': 'http://purl.org/dc/elements/1.1/' | |
| ) do | root | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const fs = require( 'fs' ) | |
| const process = require( 'process' ) | |
| const path = require( 'path' ) | |
| const { authenticate } = require( '@google-cloud/local-auth' ) | |
| const { google } = require( 'googleapis' ) | |
| const moment = require( 'moment' ) | |
| const YoutubeOwnData = class YoutubeOwnData { | |
| constructor() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| {"type":"node","id":"0","labels":["User"],"properties":{"born":"2015-07-04T19:32:24","name":"Adam","place":{"crs":"wgs-84","latitude":13.1,"longitude":33.46789,"height":null},"age":42,"male":true,"kids":["Sam","Anna","Grace"]}} | |
| {"type":"node","id":"1","labels":["User"],"properties":{"name":"Jim","age":42}} | |
| {"type":"node","id":"2","labels":["User"],"properties":{"age":12}} | |
| {"id":"0","type":"relationship","label":"KNOWS","properties":{"since":1993,"bffSince":"P5M1DT12H"},"start":{"id":"0","labels":["User"]},"end":{"id":"1","labels":["User"]}} |