Install Dragula
npm install dragula --save
Install Dragula typings
npm install @types/dragula --save
Sample files for a basic Unicorn Capistrano3 setup - like something for DigitalOcean | |
Set up a user deploy, in new group deployers |
Start a new ionic 2 project | |
> https://ionicframework.com/docs/v2/cli/ | |
``` | |
ionic start animationTest --v2 | |
``` | |
Replace content in home files with below.. | |
``` |
Set up dragula as per the other gist.
When something is dropped, we clear the target's children and then re-append the dropped element.
Should do this more Angular-ey, but ok for now.
Access DOM elements with Angular2's ViewChild and ViewChildren. I know it's not the preferred way, but sometimes handy.
Add a #label to the element in html.
Access that in the component by setting queries in the component decorator.
Then after the view is initialised we can get the nativeElement.
ViewChildren gives us a QueryList. The children aren't accessed directly through that, but we can filter/map/foreach that to get to the elements.
How to use ng2-dnd for Angular2.1.0 in Ionic2RC0
demo at https://embed.plnkr.co/fnvUmP8fgGk2y37OBfWP/
need to use a shim for ios drag n drop https://github.com/timruffles/ios-html5-drag-drop-shim
import { Component } from '@angular/core'; | |
import { Platform } from 'ionic-angular'; | |
import { File } from '@ionic-native/file'; | |
import { Media, MediaObject } from '@ionic-native/media'; | |
@Component({ | |
selector: 'page-home', | |
templateUrl: 'home.html' | |
}) | |
export class HomePage { |
#!/bin/bash | |
# Commands taken from https://www.digitalocean.com/community/tutorials/how-to-install-and-use-docker-on-ubuntu-18-04 | |
# Run using: | |
# bash <(curl -s https://gist.githubusercontent.com/fauxneticien/159529bf6c071f90b7fd70a481e6083b/raw/47c1d9e7c922797deee9fa2ce16387d6a3ed3624/elpis-deploy.sh) | |
sudo apt update | |
sudo apt install -y apt-transport-https ca-certificates curl software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable" | |
sudo apt update | |
# added new lines for containerd |
# Taps | |
tap 'homebrew/cask-fonts' | |
tap 'homebrew/cask-versions' | |
tap 'heroku/brew' | |
# Install CLI Tools | |
## Shell Utilities | |
brew 'coreutils' | |
brew 'findutils' | |
brew 'autojump' |
# Install gpu drivers | |
sudo apt install linux-headers-$(uname -r) | |
curl -O https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin | |
sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600 | |
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/7fa2af80.pub | |
sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /" | |
sudo apt update | |
sudo apt -y install cuda | |
# Install docker instructions from https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html |