Skip to content

Instantly share code, notes, and snippets.

Avatar

Kara Graysen noisypigeon

View GitHub Profile
View playbook.yml
---
# Welcome to the playbook for Valora CI using BuildKite and Mac Stadium.
# This defines the tools and dependencies needed to test Valora and Ansible installs them.
# It is a work in progress!
# Install Homebrew and then casks and packages.
- name: Install Homebrew, casks and packages.
hosts: localhost
become: false
View playbook.yml
---
- name: Install Brew packages
hosts: localhost
become: false
vars:
brew_cask_packages:
- homebrew/cask-versions/adoptopenjdk8
- android-sdk
- android-platform-tools
- genymotion
View command.txt
find . -print | sed -e 's;[^/]*/;|____;g;s;____|; |;g'
@noisypigeon
noisypigeon / slash-command.rs
Created Aug 28, 2020
Slack Slash Command Hello World in Rust using Rocket.
View slash-command.rs
#![feature(proc_macro_hygiene, decl_macro)]
#[macro_use] extern crate rocket;
use rocket::request::Form;
#[derive(FromForm)]
pub struct Parameters {
// Payload fields from "Preparing your app to receive Commands" section in documentation:
// https://api.slack.com/interactivity/slash-commands#app_command_handling.
pub token: String,
View file.swift
try! FileManager.default.removeItem(at:Realm.Configuration.defaultConfiguration.fileURL!)
@noisypigeon
noisypigeon / guessing_game.rs
Created Jul 19, 2019
Guessing Game example from The Rust Programming Language book.
View guessing_game.rs
extern crate rand;
use std::io;
use std::cmp::Ordering;
use rand::Rng;
fn main() {
println!("Guess the number!");
let secret_number = rand::thread_rng().gen_range(1, 101);
View Checkin.swift
//
// Checkin.swift
// Created by Luna Graysen on 2019-05-01.
// Copyright © 2019 Luna Graysen. All rights reserved.
//
import Foundation
struct Checkin {
View checkbox.js
insertCheckboxFormField(pageRect, pageNo, type) {
let instance = this.PSPDF;
async function createNewFormField(instance) {
try {
const formFieldName = type + "_formfield";
const newFormFieldName = `${formFieldName}_${Math.random()
.toString(36)
.replace(/[^a-z]+/g, "")}`;
View custom-button-toolbar-example.js
const toolbarItems = PSPDFKit.defaultToolbarItems;
let pagerIndex = toolbarItems.findIndex(item => item.type == "pager");
toolbarItems.splice(pagerIndex - 1, 0, {
type: "custom",
title: "click me",
onPress: function() {
console.log("click");
}
});