Skip to content

Instantly share code, notes, and snippets.

@haysclark
haysclark / close.io.d.ts
Last active January 17, 2023 23:55
Typescript types for Close.io - WIP
declare module "close.io" {
interface DataResult<T> {
has_more: boolean
total_results: number
data: T[]
}
interface PhoneResult extends Record<string, any> {
type: string // "office"
phone_formatted: string // "+1 800-444-5555"
@haysclark
haysclark / ExtendScript.d.ts
Last active November 5, 2024 09:24
Illustrator 26.0.3 TypeScript types for use with Adobe CEP and ExtendScript (WIP)
// Type declarations for ExtendScript Built-in types
// Initial declarations by: Eric Robinson <[email protected]>
/**
* The base class of all JavaScript objects.
*/
interface Object {
/**
* Points to the constructor function that created this object.
* Note that this property is treated as an XML element in the XML class.
@haysclark
haysclark / charts_PROJECT-NAME_templates_deployment.yaml
Last active March 8, 2022 05:57
Jenkins-X scale Previews to Zero with Osiris for dev packs with `preview/values.yaml.gotoml` (note: I'm using "_" in filename instead of "/" because of Gist limitation)
{{- if .Values.knativeDeploy }}
{{- else }}
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "fullname" . }}
labels:
draft: {{ default "draft-app" .Values.draft }}
chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
{{- if .Values.deploymentLabels }}
@haysclark
haysclark / rename-git-master-to-main
Created April 21, 2021 19:16
bash script to quickly switch a git repo from master to main
#!/usr/bin/env bash
# confirm user action
echo "You are about to rename git master branch to main?"
read -r -p "Are you sure? [y/N] " response
if [[ "$response" =~ ^([yY][eE][sS]|[yY])$ ]]
then
git branch -m master main
git push -u origin main
@haysclark
haysclark / install-jx.sh
Last active July 1, 2019 22:04
Shell script for install the latest version of Jenkins-X in Google Shell
#!/bin/bash
# jx
pushd /tmp/
curl -s https://api.github.com/repos/jenkins-x/jx/releases/latest \
| grep browser_download_url \
| grep linux-amd64 \
| cut -d '"' -f 4 \
@haysclark
haysclark / OVRPlugin.cs
Created August 3, 2018 19:32
OSX fix for Oculus Utilities for Unity version 1.27.0
/************************************************************************************
Copyright : Copyright 2017 Oculus VR, LLC. All Rights reserved.
Licensed under the Oculus VR Rift SDK License Version 3.4.1 (the "License");
you may not use the Oculus VR Rift SDK except in compliance with the License,
which is provided at the time of installation or download, or which
otherwise accompanies this software in either electronic or hard copy form.
You may obtain a copy of the License at
For debugging messages, please use the --debug option.
Debugging messages may help finding a solution to your problem.
If you intend to send any error or debug messages to the gphoto
developer mailing list <[email protected]>, please run
gphoto2 as follows:
env LANG=C gphoto2 --debug --debug-logfile=my-logfile.txt --capture-image
Please make sure there is sufficient quoting around the arguments.
0.000016 main (2): ALWAYS INCLUDE THE FOLLOWING LINES WHEN SENDING DEBUG MESSAGES TO THE MAILING LIST:
0.000055 main (2): gphoto2 2.5.15
0.000060 main (2): gphoto2 has been compiled with the following options:
0.000075 main (2): + clang (C compiler used)
0.000078 main (2): + popt (mandatory, for handling command-line parameters)
0.000081 main (2): + no exif (for displaying EXIF information)
0.000084 main (2): + no cdk (for accessing configuration options)
0.000086 main (2): + no aa (for displaying live previews)
0.000089 main (2): + jpeg (for displaying live previews in JPEG format)
0.000091 main (2): + readline (for easy navigation in the shell)
@haysclark
haysclark / squeezecloud_0_9_1.xml
Last active March 2, 2017 08:00
Testing url for SqueezeCloud version 0.9.1
<extensions>
<details>
<title lang="EN">SqueezeCloud Plugin</title>
</details>
<plugins>
<plugin name="SqueezeCloud" version="0.9.1" minTarget="7.5" maxTarget="*">
<title lang="EN">SqueezeCloud</title>
<desc lang="EN">Browse, search and play urls from soundcloud</desc>
<url>
http://haysclark.github.io/SqueezeCloud/SqueezeCloud-0.9.1.zip
@haysclark
haysclark / FlexSDKCodingConventions.md
Created December 13, 2015 02:24
Flex SDK coding conventions and best practices, converted to GitHub friendly Markdown

Flex SDK coding conventions and best practices

Note: This page is not yet complete and has some sections marked TBD. But there's plenty here to get you started!

Introduction

This document lays out the coding standards for writing open-source Flex framework components in ActionScript 3. Adhering to these standards makes the source code look consistent, well-organized, and professional.