start new:
tmux
start new with session name:
tmux new -s myname
| // | |
| // ContentView.swift | |
| // TestingMoreSwiftUI | |
| // | |
| // Created by Chris Eidhof on 04.06.19. | |
| // Copyright © 2019 Chris Eidhof. All rights reserved. | |
| // | |
| import SwiftUI | |
| import Combine |
| // This example shows how higher-kinded types can be emulated in Swift today. | |
| // It acheives correct typing at the cost of some boilerplate, manual lifting and an existential representation. | |
| // The technique below was directly inspired by the paper Lightweight Higher-Kinded Polymorphism | |
| // by Jeremy Yallop and Leo White found at http://ocamllabs.io/higher/lightweight-higher-kinded-polymorphism.pdf | |
| /// `ConstructorTag` represents a type constructor. | |
| /// `Argument` represents an argument to the type constructor. | |
| struct Apply<ConstructorTag, Argument> { | |
| /// An existential containing a value of `Constructor<Argument>` | |
| /// Where `Constructor` is the type constructor represented by `ConstructorTag` |
| sudo apt-get update | |
| sudo apt-get install build-essential chrpath libssl-dev libxft-dev -y | |
| sudo apt-get install libfreetype6 libfreetype6-dev -y | |
| sudo apt-get install libfontconfig1 libfontconfig1-dev -y | |
| cd ~ | |
| export PHANTOM_JS="phantomjs-2.1.1-linux-x86_64" | |
| wget https://github.com/Medium/phantomjs/releases/download/v2.1.1/$PHANTOM_JS.tar.bz2 | |
| sudo tar xvjf $PHANTOM_JS.tar.bz2 | |
| sudo mv $PHANTOM_JS /usr/local/share | |
| sudo ln -sf /usr/local/share/$PHANTOM_JS/bin/phantomjs /usr/local/bin |
| Disclaimer: The instructions are the collective efforts from a few places online. | |
| Nothing here is my original. But I want to put them together in one place to save people from spending the same time as I did. | |
| First off, bundle. | |
| ================== | |
| 1. cd to the project directory | |
| 2. Start the react-native packager if not started | |
| 3. Download the bundle to the asset folder: | |
| curl "http://localhost:8081/index.android.bundle?platform=android" -o "android/app/src/main/assets/index.android.bundle" |
| " Vundle config | |
| set nocompatible " be iMproved, required | |
| filetype off " required | |
| " set the runtime path to include Vundle and initialize | |
| set rtp+=~/.vim/bundle/Vundle.vim | |
| call vundle#begin() | |
| " alternatively, pass a path where Vundle should install plugins | |
| "call vundle#begin('~/some/path/here') |
| /** カタカナをひらがなに変換する関数 | |
| * @param {String} src - カタカナ | |
| * @returns {String} - ひらがな | |
| */ | |
| function katakanaToHiragana(src) { | |
| return src.replace(/[\u30a1-\u30f6]/g, function(match) { | |
| var chr = match.charCodeAt(0) - 0x60; | |
| return String.fromCharCode(chr); | |
| }); |