Skip to content

Instantly share code, notes, and snippets.

@cjgratacos
cjgratacos / 1-zig-cheatsheet
Created April 9, 2026 03:40 — forked from anoduck/1-zig-cheatsheet
Zig cheatsheet
https://ziglang.org/documentation/master/#Pointers
*T - single-item pointer to exactly one item.
Supports deref syntax: ptr.*
[*]T - pointer to unknown number of items. (eq. of *T in C)
Supports index syntax: ptr[i]
Supports slice syntax: ptr[start..end]
Supports pointer arithmetic: ptr + x, ptr - x
if !exists('g:vscode')
set nocompatible
let mapleader = "\<Space>"
lua require('plugins')
lua require('themes')
lua require('servers')
lua require('debugger')

SANDBOX

Notes

For sandbox the tax code with ID 19 is a hybrid tax.

Test #1

  • Account Type: Sandbox
  • Request Type: Invoice Sparse Update
  • Before request data:
{
 "Invoice": {
@cjgratacos
cjgratacos / cloudSettings
Created January 29, 2018 04:28
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-01-29T04:28:49.678Z","extensionVersion":"v2.8.7"}
"patches":{
"asm89/stack-cors": {
"(November 29 2017 06:22:06 PM: See issue #223 on contentacms/contenta_jsonapi) Add origin matcher for wildcard matching": "https://raw.githubusercontent.com/cjgratacos/patches/master/asm89_stack-cors/pull_request_42.patch"
}
}
@cjgratacos
cjgratacos / README.md
Last active November 29, 2017 21:02
See Issue #223 on contentacms/contenta_jsonapi: Add origin matcher for wildcard matching

asm89/stacks-cors

This folder contains patches for the library ams89/stack-cors that can't be applied due to some particular cirmcumstance.

Patches

pull_request_42.patch

  • Patch created on:
    • November 29 2017 06:22:06 PM (1511979726)
  • Original source:
@cjgratacos
cjgratacos / adjacent.php
Created November 1, 2017 18:39
Simple Algorigthm: Closest biggest adjacent number
<?php
// By Carlos Gratacos
// Input: 1 interger number
// Output: false-> if not possible, else return return the smaller or greater input by switching adjacent digit
// Biggest closest to the original one
// 123 -> 132
//
// 254 -> 524
@cjgratacos
cjgratacos / deploy.sh
Created October 9, 2017 00:25
Deploy to Composer Drupal 8 to Pantheon on non Multidev environments. This is good for when pushing code from a release branch to Pantheon dev directly.
#!/usr/bin/env bash
# Deploy to Pantheon
# Variables needed for this script
#
# Project Variables
# $PROJECT_BASE_PATH: Base path for the D8 project
#
# Terminus Variables