Skip to content

Instantly share code, notes, and snippets.

View davxdo's full-sized avatar
🦀
Rustacean

C.OG davxdo

🦀
Rustacean
View GitHub Profile
#!/bin/bash
#set -euxo pipefail
set -o pipefail
echo "Installing json globally for the time being";
npm i -g json
mv tsconfig.base.json tsconfig.json
yarn nx add @angular-eslint/schematics
yarn add [email protected] -D
# [short title of solved problem and solution]
* Status: [proposed | rejected | accepted | deprecated | … | superseded by [ADR-0005](0005-example.md)] <!-- optional -->
* Deciders: [list everyone involved in the decision] <!-- optional -->
* Date: [YYYY-MM-DD when the decision was last updated] <!-- optional -->
Technical Story: [description | ticket/issue URL] <!-- optional -->
## Context and Problem Statement
@davxdo
davxdo / Fastfile
Created June 2, 2020 20:54
automated ios deploy for test flight
default_platform(:ios)
platform :ios do
desc "Push a new beta build to TestFlight"
lane :beta do
increment_build_number
build_ios_app(
export_xcargs: "-allowProvisioningUpdates",
export_method: 'app-store'
)
@davxdo
davxdo / anime-parrallax.js
Created February 26, 2020 14:18
Parallax scroll anime
$("[data-parallax]").each(function () {
var $this = $(this);
var animetl = anime.timeline({autoplay: false});
var properties = {
targets: $this[0],
easing: "linear"
};
// Parse properties from attribute and add them to properties object
$.each($this.attr("data-parallax").split(/[,\s]+(?={)/), function (i, value) {
@davxdo
davxdo / to_json.py
Created February 25, 2020 17:37
to json function on jinja versions that don't have the pipe
import json
values['to_json'] = lambda x: json.dumps(x)
@davxdo
davxdo / Makefile
Created February 15, 2020 07:59
Starter makefile for Angular / Ionic + Fastlane
.PHONY: init_fastlane
init_fastlane:
@echo "🚀 Initialising Fastlane"
@cd ios/App; fastlane init
.PHONY: init_match
init_match:
@echo "✍🏽 Initialising match"
@cd ios/App; fastlane match init
- name: Get npm cache directory
id: npm-cache
run: |
echo "::set-output name=dir::$(npm config get cache)"
- uses: actions/cache@v1
with:
path: ${{ steps.npm-cache.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
@davxdo
davxdo / posenet.js
Created September 24, 2019 08:13
Blur posture
let video;
let poseNet;
let poses = [];
var started = false;
function setup() {
const canvas = createCanvas(640, 480); // or use to make fullscreen canvas window.innerWidth, window.innerHeight, but you should to change the formula in changeFontSize()
canvas.parent('videoContainer');
// Video capture
@davxdo
davxdo / mouse-move.ts
Created July 27, 2019 19:55
Custom mouse cursor
<style>
.circle-cursor {
position: fixed;
left: 0;
top: 0;
pointer-events: none;
border-radius: 50%;
}
{
"extends": "stylelint-config-standard",
"rules": {
"indentation": 2,
"string-quotes": "single",
"no-duplicate-selectors": true,
"color-named": "always-where-possible",
"color-no-hex": true,
"selector-no-qualifying-type": true,
"selector-no-id": true,