This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// How to build: | |
// # compile the metal shaders | |
// xcrun -sdk macosx metal -c shaders.metal -o shaders.air | |
// xcrun -sdk macosx metallib shaders.air -o shaders.metallib | |
// # compile the c file | |
// clang app_metal.c -framework Cocoa -framework Metal -o metal_c.app | |
// | |
// | |
// Draw a triangle using metal | |
// Metal tutorial followed here: https://www.raywenderlich.com/7475-metal-tutorial-getting-started |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.File | |
import java.security.MessageDigest | |
val gradleBase = System.getenv("HOME") + "/.gradle/caches/modules-2/files-2.1" | |
val m2Base = System.getenv("HOME") + "/.m2/repository" | |
fun ByteArray.toHex() = this.map { "%02x".format(it) }.joinToString("") | |
operator fun File.get(name: String) = File(this, name) | |
for (groupFolder in File(gradleBase).listFiles().filter { it.isDirectory }) { | |
val group = groupFolder.name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tricks to add encrypted private SSH key to .travis.yml file | |
To encrypt the private SSH key into the "-secure: xxxxx....." lines to place in the .travis.yml file, generate a deploy key then run: (to see what the encrypted data looks like, see an example here: https://github.com/veewee-community/veewee-push/blob/486102e6f508214b04414074c921475e5943f682/.travis.yml#L21 | |
base64 --wrap=0 ~/.ssh/id_rsa > ~/.ssh/id_rsa_base64 | |
ENCRYPTION_FILTER="echo \$(echo \"-\")\$(travis encrypt veewee-community/veewee-push \"\$FILE='\`cat $FILE\`'\" | grep secure:)" | |
split --bytes=100 --numeric-suffixes --suffix-length=2 --filter="$ENCRYPTION_FILTER" ~/.ssh/id_rsa_base64 id_rsa_ | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Mathieu 'p01' Henri http://www.p01.org/releases/ | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Mathieu 'p01' Henri - http://www.p01.org/releases/ | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |