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 { tired, sleep, eat, walk } from “my_body/index.js”; | |
import { pray } from “my_body/heart.js”; | |
import { wahtDoIKnow, why } from “my_body/brain.js”; | |
const knowledge = []; | |
function write() { | |
while (!tired()) { | |
const text = knowledge.shift() || wahtDoIKnow(); | |
text.split(“ “).forEach(word => { |
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/sh -e | |
# Usage: sendsms +375555555 "some text i want to send" | |
TELFNUMB="$1" | |
SMSTEXT="$2" | |
MODEM="${3:-/dev/ttyUSB2}" | |
TIMEOUT="${4:-1}" | |
# Text encoding |
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/sh | |
crystalread() { | |
awk -F \; '{ printf("%32s : %8.2f MB/s [%9.1f IOPS]\n", $3, $7*1024/1e6, $8) }' | |
} | |
crystalwrite() { | |
awk -F \; '{ printf("%32s : %8.2f MB/s [%9.1f IOPS]\n", $3, $48*1024/1e6, $49) }' | |
} |
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 -e | |
# Download OpenJDK Reference Implementation Sources from | |
# http://jdk.java.net/java-se-ri/10 | |
curl -O https://download.java.net/openjdk/jdk10/ri/openjdk-10_src.zip | |
# Navigate to the hsdis sources | |
unzip openjdk-10_src.zip | |
cd openjdk/src/utils/hsdis |
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 java.util.concurrent.BrokenBarrierException; | |
import java.util.concurrent.CountDownLatch; | |
import java.util.concurrent.CyclicBarrier; | |
import java.util.concurrent.TimeUnit; | |
import java.util.concurrent.atomic.AtomicLong; | |
import java.util.concurrent.locks.Lock; | |
import java.util.concurrent.locks.ReentrantLock; | |
public class TestIncrement { | |
public static void main(String[] args) throws InterruptedException, BrokenBarrierException { |
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
plugins { | |
id 'idea' | |
id 'com.zyxist.chainsaw' version '0.3.1' apply false | |
id "org.jetbrains.kotlin.jvm" version "1.2.31" apply false | |
} | |
subprojects { | |
apply plugin: 'idea' | |
apply plugin: 'java-library' | |
apply plugin: 'com.zyxist.chainsaw' |
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
#!scala | |
import scala.concurrent.ExecutionContext.Implicits.global | |
import scala.util.Success | |
import scala.util.Failure | |
val x: Future[Boolean] = Future.successful(true) | |
val y: Future[Boolean] = Future.successful(false) | |
val xMapped: Future[Int] = x.map(_ match { case true => 42 case false => throw new Exception("hey") }) |
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
.bytecode 49.0 | |
.source Hello.j | |
.class Hello | |
.super java/lang/Object | |
; This example method uses a PrintMe subroutine to invoke the System.out.println() method. | |
.method static usingSubroutine()V | |
.limit stack 2 | |
.limit locals 2 |
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
# Note: I had to install a lot of required libraries and dev packages from Cygwin. | |
# I am not listing these here. The easiest way around this would be to do a | |
# complete installation of cygwin. | |
# | |
# Build libvncserver | |
# | |
git clone git://git.code.sf.net/p/libvncserver/code libvncserver-code | |
cd !$ |
NewerOlder