Skip to content

Instantly share code, notes, and snippets.

View jdnichollsc's full-sized avatar
🏠
Working from home

J.D Nicholls jdnichollsc

🏠
Working from home
View GitHub Profile
@jdnichollsc
jdnichollsc / ABC.md
Last active February 5, 2021 14:42
English is a work in progress

Useful Phrases

Clarification

  • What does that mean?
  • How does it work?
  • How long does it take?
  • Could you say that again, please?

Collaboration

  • When will the next meeting be?
@jdnichollsc
jdnichollsc / ROADMAP.md
Last active May 23, 2020 21:20
Proyecto 26's YouTube channel - https://youtube.com/proyecto26

TODO

  • Inicio, qué es Proyecto 26?
  • Dibujando en WebGL/Canvas (IonPhaser)
  • Animaciones en React Native (Newbies)
  • SQLite en mobile (Ionic, React Native, etc)
  • Code sharing (Ionic, NativeScript) for Web, PWA, Mobile
  • Requests HTTP en Unity (RestClient)
  • REST APIs para juegos
  • Requests http, observables, cancelación, etc
@jdnichollsc
jdnichollsc / storage.ts
Last active November 19, 2024 01:15
Upload Base64/Blob files to Google Cloud Storage
import { join } from 'path'
import { get } from 'lodash'
import { Storage } from '@google-cloud/storage'
import { BUCKET_NAME } from '../constants'
import { base64MimeType } from '../utils'
const gcloudPathKey = join(__dirname, '../gcloud-key.json')
const storage = new Storage({
projectId: 'my-project-id',
@jdnichollsc
jdnichollsc / AnimatableComponents.tsx
Created November 27, 2019 01:57
Using HOC with StencilJS
import { Component, h } from '@stencil/core';
import { createAnimatableComponent } from '@proyecto26/animatable-component'
const HelloWorldButton = (props) => {
const { iconName, ...rest } = props
return (
<ion-fab-button onClick={() => alert('Hello World')} {...rest}>
<ion-icon name={iconName || 'home'} />
</ion-fab-button>
)
@jdnichollsc
jdnichollsc / easing-functions.md
Created November 25, 2019 09:29
Default Easing Functions in <animatable/> Web Component - https://proyecto26.github.io/animatable-component
Easing Functions
"linear" "ease" "ease-in" "ease-out" "ease-in-out"
"ease-in-cubic" "ease-out-cubic" "ease-in-out-cubic"
"ease-in-circ" "ease-out-circ" "ease-in-out-circ"
"ease-in-expo" "ease-out-expo" "ease-in-out-expo"
"ease-in-quad" "ease-out-quad" "ease-in-out-quad"
"ease-in-quart" "ease-out-quart" "ease-in-out-quart"
"ease-in-quint" "ease-out-quint" "ease-in-out-quint"
"ease-in-sine" "ease-out-sine" "ease-in-out-sine"
@jdnichollsc
jdnichollsc / animations.md
Last active November 25, 2019 09:27
Default Animations in <animatable/> Web Component - https://proyecto26.github.io/animatable-component
Animations
"bounce" "flash" "jello" "pulse" "rotate"
"shake" "swing" "rubberBand" "tada" "wobble"
"heartBeat"
"bounceIn" "bounceInUp" "bounceInDown" "bounceInRight" "bounceInLeft"
"bounceOut" "bounceOutUp" "bounceOutDown" "bounceOutRight" "bounceOutLeft"
"fadeIn" "fadeInUp" "fadeInUpBig" "fadeInDown" "fadeInDownBig"
"fadeInRight" "fadeInRightBig" "fadeInLeft" "fadeInLeftBig"
"fadeOut" "fadeOutUp" "fadeOutUpBig" "fadeOutDown" "fadeOutDownBig"
@jdnichollsc
jdnichollsc / animatable-element.html
Last active November 25, 2019 08:24
<animatable/> with VanillaJS (Proof that Tony Stark has a heart ✵) - https://proyecto26.github.io/animatable-component
<!-- Add Web Animations Polyfill :) -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/web-animations/2.3.2/web-animations.min.js"></script>
<script type="module" src="https://unpkg.com/@proyecto26/animatable-component@1.0.0/dist/animatable-component/animatable-component.esm.js"></script>
<script nomodule="" src="https://unpkg.com/@proyecto26/animatable-component@1.0.0/dist/animatable-component/animatable-component.js"></script>
<animatable-component autoplay iterations="3" animation="heartBeat" easing="ease-in" duration="1000">
<h1>Proof that Tony Stark has a heart ✵</h1>
</animatable-component>
@jdnichollsc
jdnichollsc / record-audio.ts
Last active July 17, 2021 05:18
Record audio (Cordova/Ionic) using cordova-plugin-media and cordova-plugin-file
import { Media, MediaObject } from '@ionic-native/media';
import { File as NativeFile, FileEntry } from '@ionic-native/file';
import { delay, getBlobFromFileEntry } from './utils'
// Detect platform device and select extension (Cordova platform, etc)
// Android
const AUDIO_EXTENSION = '.mp3'
// iOS
const AUDIO_EXTENSION = '.m4a'