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
// implementation("io.methvin:directory-watcher:0.15.0") | |
import io.ktor.server.application.* | |
import io.ktor.server.response.* | |
import io.ktor.server.routing.* | |
import io.methvin.watcher.* | |
import java.io.* | |
var resourceVersion = 0L |
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
// gcc -framework Audiotoolbox -framework CoreAudio -framework CoreServices main.c | |
#include <stdlib.h> | |
#include <math.h> | |
#include <AudioToolbox/AudioQueue.h> | |
#include <CoreAudio/CoreAudioTypes.h> | |
#include <CoreFoundation/CFRunLoop.h> | |
#define NUM_CHANNELS 2 |
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
package com.soywiz.util | |
import com.soywiz.klock.* | |
import com.soywiz.korio.file.* | |
import com.soywiz.korio.serialization.xml.* | |
class TvShowNfo { | |
data class Info( | |
var title: String = "", | |
var sortTitle: String? = null, |
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
#!/usr/bin/env bash | |
export CMD=$1 | |
export VOLUME=$2 | |
export FILE=$3 | |
if [ "$CMD" == "" ] || [ "$VOLUME" == "" ] || [ "$FILE" == "" ]; then | |
echo "Missing argument/s: $0 [ls|rm|get|put] volume file" | |
exit | |
fi |
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
export gpgconf_path=`which gpgconf` | |
echo "gpgconf_path: $gpgconf_path" | |
if [ "$gpgconf_path" = "" ]; then | |
echo Non gpg2 in path | |
exit 1 | |
fi | |
read -r -d '' homebrew_gpg_gpg_agent_plist << \ | |
_______________________________________________________________________________ |
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
class SimplifiedXmppClient private constructor( | |
val user: String, | |
val password: String, | |
val host: String, | |
val port: Int, | |
val domain: String | |
) { | |
companion object { | |
suspend fun connectTo( |
This file has been truncated, but you can view the full file.
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
<?php | |
// JTransc 0.6.3-snapshot : https://github.com/jtransc/jtransc | |
// php program.php | |
// hhvm -v Eval.EnableHipHopSyntax=true program.php | |
if (defined('HHVM_VERSION')) { | |
// @TODO: Check minimum HHVM_VERSION | |
} else { | |
if (version_compare(phpversion(), '7.1.0', '<')) die('Requires PHP 7.1 or higher but was ' . phpversion()); |
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
git update-index --chmod=+x file.sh | |
git ls-tree HEAD |
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
// Depends on code defined here (related to EventLoop and promise implementation): | |
// https://gist.github.com/soywiz/a2a26b9375f1f85048ab3ce7ffdb5501 | |
// More examples here: httpshttps://github.com/kotlin-es/coroutine-examples/blob/master/src/example-async-generator.kt | |
import java.util.* | |
fun main(args: Array<String>) = EventLoop.main { | |
// Asynchronous Producer |
NewerOlder