This file contains hidden or 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 scala.scalajs.js | |
import typings.node.dgramMod as dgram | |
import typings.node.dgramMod.SocketType | |
import typings.node.nodeStrings.message | |
import typings.node.global.console | |
import typings.std.stdStrings.add | |
object Dgram { | |
def send(msg: String, host: String, port: Int): Unit = { |
This file contains hidden or 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 scala.concurrent.Future | |
import scala.scalajs.js | |
import scala.util.Success | |
import scala.util.Failure | |
object SelfTest { | |
def GREEN_CIRCLE: String = "\uD83D\uDFE2" | |
def RED_CIRCLE: String = "\uD83D\uDD34" |
This file contains hidden or 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 scala.concurrent.Future | |
import org.scalajs.dom | |
import org.scalajs.dom.Request | |
import org.scalajs.dom.Fetch | |
import org.scalajs.dom.HttpMethod | |
import org.scalajs.dom.RequestInit | |
import org.scalajs.dom.Headers | |
implicit val ec: scala.concurrent.ExecutionContext = scala.concurrent.ExecutionContext.global | |
object ApiClient { |
This file contains hidden or 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 elemental2.dom.DomGlobal; | |
import elemental2.promise.Promise; | |
import java.util.List; | |
import java.util.function.Supplier; | |
public class Tests { | |
public static final String GREEN_CIRCLE = "\uD83D\uDFE2"; | |
public static final String RED_CIRCLE = "\uD83D\uDD34"; |
This file contains hidden or 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 elemental2.dom.XMLHttpRequest; | |
import elemental2.promise.Promise; | |
public class Http { | |
enum HttpMethod { | |
GET, POST | |
} | |
public static Promise<String> request(HttpMethod method, String url) { |
This file contains hidden or 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
// add to html: | |
// <input type="file" id="file-selector" multiple> | |
HTMLInputElement fileSelector = (HTMLInputElement) DomGlobal.document.getElementById("file-selector"); | |
fileSelector.addEventListener("change", event -> { | |
FileList files = ((HTMLInputElement) (event.target)).files; | |
for (int i = 0; i < files.length; i++) { | |
File file = files.item(i); | |
file.arrayBuffer() | |
.then( | |
success -> { |
This file contains hidden or 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 libpulse.functions.pa_simple_new | |
import libpulse.functions.pa_simple_write | |
import libpulse.functions.pa_simple_free | |
import libpulse.types.pa_sample_spec | |
import libpulse.types.pa_sample_format | |
import libpulse.types.pa_stream_direction | |
import libpulse.extern_functions | |
import scala.scalanative.unsafe | |
import scala.scalanative.unsafe._ | |
import scalanative.unsigned.UnsignedRichInt |
This file contains hidden or 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
#!/bin/bash | |
# usage: ./unpack-appimage.sh <appimage_file.AppImage> | |
APP_IMAGE=$(readlink -f $1) | |
APP_IMAGE_FILE=$(basename ${APP_IMAGE}) | |
APP_DIR=$(dirname $APP_IMAGE) | |
APP_IMAGE=$(readlink -f $1) | |
ELFSIZE=$(readelf -h $APP_IMAGE) |
This file contains hidden or 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
# from within project root | |
# *.tar.gz should be present on upper level | |
# root directory name : {projectname}-{version} | |
# bin for runnable binary | |
debmake --binaryspec <project_name>:bin | |
# ESSENTIAL: remove debian/changelog nnnn references | |
# ESSENTIAL: update debian/control section field | |
debuild -us -uc |
NewerOlder