Skip to content

Instantly share code, notes, and snippets.

View iksnae's full-sized avatar

K Mills iksnae

View GitHub Profile
Coverage Badges
@iksnae
iksnae / screenplayer.json
Created June 17, 2023 17:47
screenplayer.json
openapi: 3.0.3
info:
title: Screenplayer API
description: API for managing and interacting with screenplays and projects in the Screenplayer platform.
version: 1.0.0
paths:
/api/projects:
post:
summary: Create a Project
@iksnae
iksnae / api.yml
Created June 17, 2023 15:30
screenplayer-api
version: '3'
services:
openapi-mock:
container_name: openapi_mock
image: muonsoft/openapi-mock
ports:
- '8080:8080'
environment:
- OPENAPI_MOCK_SPECIFICATION_URL=/app/api.yml
volumes:
@iksnae
iksnae / README.txt
Created October 26, 2021 15:53
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.8.7+commit.e28d00a7.js&optimize=false&runs=200&gist=
REMIX EXAMPLE PROJECT
Remix example project is present when Remix loads very first time or there are no files existing in the File Explorer.
It contains 3 directories:
1. 'contracts': Holds three contracts with different complexity level, denoted with number prefix in file name.
2. 'scripts': Holds two scripts to deploy a contract. It is explained below.
3. 'tests': Contains one test file for 'Ballot' contract with unit tests in Solidity.
SCRIPTS
@iksnae
iksnae / update-docker-service.sh
Created December 30, 2019 23:59
update docker service
docker service update --image <image>:<version> <service>
@iksnae
iksnae / swiftbysundell.link
Last active December 30, 2019 23:10
Swift by Sundell
@iksnae
iksnae / erc-login.sh
Created December 30, 2019 22:48
Elastic Repository Login Command
$(aws ecr get-login --no-include-email --region us-west-2)
@iksnae
iksnae / uncle_bob_scribe_oath.md
Last active September 4, 2019 16:00 — forked from ebramanti/uncle_bob_scribe_oath.md
Uncle Bob Scribe's Oath

Uncle Bob - Scribe's Oath

  1. I will not produce harmful code.
    • I will not intentionally write code with bugs.
    • This means: Do your best.
  2. The code that I produce will always be my best work. I will not knowingly allow code that is defective either in behavior or structure to accumulate.
  3. I will produce, with each release, a quick, sure, and repeatable proof that every element of the code works as it should.
  4. I will make frequent, small, releases so that I do not impede the progress of others.
  5. I will fearlessly and relentlessly improve my creations at every opportunity. I will never degrade them.
  6. I will do all that I can to keep the productivity of myself, and others, as high as possible. I will do nothing that decreases that productivity.
@iksnae
iksnae / days-between.js
Created July 30, 2019 17:45
Determine days between 2 dates with moment.js
let moment = require("moment")
let now = moment()
let otherDate = moment([2019, 6, 28])
let daysBetween = now.diff(otherDate, 'days')
let lessThanWeek = daysBetween <= 7
console.log(`${now} vs ${otherDate}` )
console.log(`Has it been less than a week? ${lessThanWeek?"YES":"NO"}. It's been ${daysBetween} days.`)
@iksnae
iksnae / ssh-host-color
Created November 15, 2018 02:28 — forked from lherich/ssh-host-color
Automatically set random background color in iTerm depending on ssh host
#!/bin/bash
#
# ssh into a machine and automatically set the background
# color of Mac OS X Terminal depending on the hostname.
#
# Installation:
# 1. Save this script to /usr/local/bin/ssh-host-color
# 2. chmod 755 /usr/local/bin/ssh-host-color
# 3. alias ssh=/usr/local/bin/ssh-host-color
# 4. export PRODUCTION_HOST="<hostname_production_server>"