Small bash script for lauching virtual MacOS instance using Tart.
echo "Hello, World!" | ./virtually.sh
import androidx.compose.ui.geometry.Rect | |
import androidx.compose.ui.graphics.Canvas | |
import androidx.compose.ui.graphics.Paint | |
fun Canvas.withSavedState(block: Canvas.() -> Unit) { | |
save() | |
try { | |
block() | |
} finally { | |
restore() |
Small bash script for lauching virtual MacOS instance using Tart.
echo "Hello, World!" | ./virtually.sh
import SwiftUI | |
struct Flow: Layout { | |
struct PartialRect { | |
let subview: LayoutSubview | |
let x: CGFloat | |
let size: CGSize | |
} | |
const user = await isvalid(/* data */, | |
{ | |
type: Object, | |
schema: { | |
'username': { /* username validators */ }, | |
'password': { type: String, required: true, match: /* some regular expression */ }, | |
'password_repeated': { type: String, required: true } | |
}, | |
post: (obj) { | |
if (obj.password !== obj.password_repeated) { |
if (!String.prototype.toCase) { | |
Object.defineProperties(String.prototype, { | |
'toCase': { | |
value: function(type = 'camel') { | |
const seperators = { | |
'camel': '', | |
'pascal': '', | |
'snake': '_', | |
'domain': '.', |
const express = require('express'); | |
const app = express(); | |
app.get( | |
'/', | |
async (req, res) => { | |
res.json(await something()); | |
}); |
// | |
// NSObject+NSObject_AssociatedObjects.h | |
// Created by Kristian Trenskow. | |
// | |
#import <Foundation/Foundation.h> | |
/** | |
Associated objects additions to `NSObject`. | |
*/ |
body, body:before, body:after, .site-wrapper { | |
background: transparent !important; | |
background-image: none !important; | |
} |
ofEnableBlendMode(OF_BLENDMODE_ALPHA); | |
ofEnableAlphaBlending(); | |
_internalImage.allocate(ofGetWidth(), ofGetHeight(), OF_IMAGE_COLOR_ALPHA); | |
_internalImage.setUseTexture(true); | |
_internalImage.setColor(ofColor(0, 0, 0, 0)); | |
_internalImage.bind(); |
var express = require('express'); | |
var app = express(); | |
app.configure(function() { | |
app.use(express.bodyParser()); | |
app.get('/', function(req, res, next) { |