Skip to content

Instantly share code, notes, and snippets.

View TheSnowfield's full-sized avatar
🍣
I love sushi and raw salmon. (●ˇ∀ˇ●) yummy~

TheSnowfield TheSnowfield

🍣
I love sushi and raw salmon. (●ˇ∀ˇ●) yummy~
View GitHub Profile
@TheSnowfield
TheSnowfield / braille pattern.md
Last active January 30, 2022 09:25
Braille character in JavaScript

Code snippet

function braille_pattern(blocks)
{
    if(!(blocks instanceof Array) || blocks.length > 8 || blocks.length < 0) 
        throw new TypeError("Only accept an array in max of 8 elements with 0/1 or true/false.");

    // value table
 const table = [1, 2, 4, 64, 8, 16, 32, 128];

Here is an example that shows you how to create a wear tile use Xamarin.

Prepare the library

  • Create a Xamarin binding library AndroidX.Wear.Tiles.
  • Download the latest androidx.wear.tiles pre-release from maven (current is 1.0.0-alpha11).
    Place the aar file into Jar in your solution, set Build Action to LibraryProjectZip in the property.
  • Download the latest androidx.wear.tiles tiles-proto pre-release from maven (current is 1.0.0-alpha11).
    Place the jar file into Jar folder of your solution, set Build Action to EmbeddedReferenceJar in the property.
  • Add Xamarin.Google.Guava.ListenableFuture NuGet package to this binding solution.
  • Edit the Metadata.xml. (I have fixed some bindings)
@TheSnowfield
TheSnowfield / gist:8d181ec877f4aae4d4cbd89e57222e35
Created April 28, 2020 02:46
gitlab-ce docker compose file for windows
# Gitlab-ce Docker Compose File
version: '3'
services:
web:
image: gitlab/gitlab-ce:latest
container_name: '容器名稱'
restart: always
hostname: '網站地址'