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
local width = 1600 | |
local height = 900 | |
window.create(width, height, "LuaGame") -- width, height, title | |
canvas.init(); | |
local ticks = 0 | |
local x = 0 | |
local y = 0 | |
local xBackwards = false |
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
local width = 1600 | |
local height = 900 | |
-- Create window & show loading message | |
window.create(width, height, "Interface test") | |
canvas.init() | |
canvas.beginFrame(width, height, 1.0) | |
canvas.createFont("Open Sans", "test/font/OpenSans-Regular.ttf") | |
canvas.fontFace("Open Sans") | |
canvas.fontSize(24) |
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
/* npm install request */ | |
var user = null; | |
var album = null; | |
var authkey = null; | |
var downloadDir = './download/{user}-{album}/'; | |
var args = process.argv.slice(2); | |
if(args.length >= 1 && args[0].substr(0, 4) === 'http'){ | |
user = args[0].substr(args[0].indexOf('.com/') + 5).split('/')[0]; |
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
tinkers-construct | |
storage-drawers | |
iron-chests | |
chisels-bits | |
rftools | |
random-things | |
actually-additions | |
psi | |
rftools-dimensions | |
more-foods |
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
'use strict'; | |
const Database = require('../src/Database'); | |
//let database = new Database(__dirname + '/example.db'); // Use file "example.db" | |
let database = new Database(null); // Use memory | |
database.define('user', { | |
id: {type: Number, index: true}, | |
name: String, |
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 nl.ndat.yui.scene | |
import java.io.File | |
import javax.imageio.ImageIO | |
class SampleScene : Scene() { | |
val logo = ImageIO.read(File("logo.png"))!! | |
var x = 0 | |
var y = 0 | |
var xR = false |
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 org.w3c.dom.events.EventTarget | |
import org.w3c.dom.events.UIEvent | |
external abstract class TouchEvent : UIEvent { | |
open val touches: Array<Touch> | |
open val targetTouches: Array<Touch> | |
open val changedTouches: Array<Touch> | |
open val altKey: Boolean | |
open val metaKey: Boolean | |
open val ctlKey: Boolean |
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 nl.ndat.isometric.ui | |
import nl.ndat.isometric.Bootstrap | |
import nl.ndat.isometric.core.IView | |
import org.w3c.dom.CanvasRenderingContext2D | |
import org.w3c.dom.Path2D | |
class Tile : IView() { | |
val styleInside = "#8BB255" | |
val styleInsideHover = "#54b2a5" |
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
CURRENT_DRIVER=$(prime-select query) | |
NEW_DRIVER="intel" | |
if [ "$CURRENT_DRIVER" = "intel" ]; then | |
NEW_DRIVER="nvidia" | |
fi | |
pkexec prime-select "$NEW_DRIVER" > /dev/null | |
echo "Switched from $CURRENT_DRIVER to $NEW_DRIVER" |
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
/* | |
* Ecmascript supports the `async` keyword to make functions async. | |
* Unfortunately it doesn't work on construcors. | |
* | |
* However: you can return in a constructor! | |
*/ | |
(async() => { // for top level await | |
class Example { | |
// ES6 constructor |
OlderNewer