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
package main | |
import ( | |
"encoding/json" | |
"io" | |
"log" | |
"log/slog" | |
"net/http" | |
"os" | |
"time" |
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 kotlinx.serialization.ExperimentalSerializationApi | |
import kotlinx.serialization.KSerializer | |
import kotlinx.serialization.Serializable | |
import kotlinx.serialization.Serializer | |
import kotlinx.serialization.decodeFromString | |
import kotlinx.serialization.encodeToString | |
import kotlinx.serialization.encoding.Decoder | |
import kotlinx.serialization.encoding.Encoder | |
import kotlinx.serialization.json.Json | |
import kotlinx.serialization.json.JsonDecoder |
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 org.apache.poi.ss.usermodel.WorkbookFactory | |
import org.apache.poi.xssf.usermodel.XSSFWorkbook | |
import java.io.FileInputStream | |
import java.io.FileOutputStream | |
fun main(args: Array<String>) { | |
val path = "test.xlsx" | |
write(path) | |
read(path) |
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.nio.ByteBuffer | |
import java.nio.charset.StandardCharsets | |
import com.amazonaws.auth.{AWSStaticCredentialsProvider, BasicAWSCredentials} | |
import com.amazonaws.client.builder.AwsClientBuilder | |
import com.amazonaws.services.kinesis.model.{GetRecordsRequest, PutRecordRequest} | |
import com.amazonaws.services.kinesis.{AmazonKinesis, AmazonKinesisClientBuilder} | |
import scala.collection.JavaConverters._ | |
import scala.util.Random |
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
set nowritebackup | |
set nobackup | |
set noswapfile | |
set clipboard+=unnamed | |
set nrformats-=octal | |
set timeoutlen=3500 | |
set hidden | |
set history=50 | |
set formatoptions+=mM |
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
casper = require('casper').create() | |
casper.start "https://facebook.com", -> | |
query = | |
email: 'youremail' | |
pass: 'yourpass' | |
@fill "#login_form", query, true | |
casper.thenOpen 'https://facebook.com/username' |
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
var gamepad = null; | |
var timer = null; | |
window.addEventListener("gamepadconnected", function(e) { | |
if (!gamepad) { | |
gamepad = e.gamepad; | |
timer = setInterval('updateStatus()', 100); | |
} | |
}); |
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
(ns wordcount.core | |
(:gen-class) | |
(:use [seesaw core graphics])) | |
(defn text-area [] | |
(scrollable | |
(text :id :txt :multi-line? true :font "MONOSPACED-PLAIN-14"))) | |
(defn count-char [txt] | |
(count (re-seq #"\S" txt))) |
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 Adafruit_BBIO.PWM as PWM | |
servo_pin = "P8_13" | |
duty_min = 3 | |
duty_max = 14.5 | |
duty_span = duty_max - duty_min | |
PWM.start(servo_pin, duty_min, 60.0) | |
while True: |
NewerOlder