Skip to content

Instantly share code, notes, and snippets.

What I want from a run-Python-in-WASM solution

I want to be able to use WebAssembly as a sandbox to safely run Python code from untrusted sources, within my existing Python applications.

I'd like to be able to:

  • Pass in an untrusted string of Python code and have that evaluated
  • Maybe also pass in initial variables to be used in the code - though hard-coding them would work OK too
  • Have the code run in a sandboxed environment, with a timeout and memory limit
  • The sandbox disallows network access and disk access - it can only access the variables passed in
@IanColdwater
IanColdwater / twittermute.txt
Last active April 22, 2024 17:26
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@ojhughes
ojhughes / bootstrap-k8s-spring-project.md
Last active January 25, 2024 21:51
Bootstrapping a Spring project for deployment on Kubernetes with a few commands.

This is my current "dev workflow" for quickly bootstrapping an Spring app on a Kubernetes cluster. The general approach is polyglot but you will need to use something like https://buildpacks.io instead of Jib to support non-JVM projects

This example uses skaffold and kapp so you will need to install from https://skaffold.dev/docs/install/ & https://k14s.io/ You will also need kubectl installed and a Kubernetes cluster targetted. You can use Minikube, Kind or K3S for lightweight, local Kubernetes environment

export APPNAME=bootstrap-k8s
export DOCKER_REGISTRY=ojhughes
@dbonillaf
dbonillaf / links_bonilista_450.md
Last active September 21, 2020 05:47
Links sobre gestión de reuniones
@sdeleuze
sdeleuze / kotlin-frontend.md
Last active October 25, 2022 14:50
My call for Kotlin as a major frontend language

My call for Kotlin as a major frontend language

I try to push for quite a long time for first class support for WebAssembly in Kotlin because I really believe that frontend development is a domain where Kotlin can be as strong as in mobile, and because this is something that would also help to increase even more the adoption on server-side.

I truly appreciate all the work already done by Kotlin/JS and Kotlin/Native teams. The dead code elimination tool and the initial WebAssembly support in Kotlin/Native are important steps in the right direction. But I believe that Kotlin needs now to make frontend a real priority to take it to the next level.

Need for a consistent and unified web frontend strategy

The first point I would like to raise is that what Kotlin needs IMO is a consistent strategy about web frontend wich includes both Javascript and WebAssembly related efforts. I can u

@beatngu13
beatngu13 / CrossBrowserTest.java
Last active May 4, 2024 17:22
Dead-simple cross-browser testing with Selenium and JUnit 5 parameterized tests
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.MethodSource;
import org.openqa.selenium.WebDriver;
class CrossBrowserTest {
@ParameterizedTest
@MethodSource( "my.package.WebDriverFactory#getAll" )
void cross_browser_test( final WebDriver driver ) {
System.out.println( "Test with " + driver.getClass().getSimpleName() );
@Amit-PivotalLabs
Amit-PivotalLabs / bosh-links-why-and-how.md
Last active December 10, 2021 21:33
BOSH Links: Why and How
@AWolf81
AWolf81 / SpringMVCWebConfig.java
Last active July 25, 2020 11:49
Spring boot configuration file (annotation-based) - configures localization
package mongodbdemo.config;
import java.util.Locale;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.support.ReloadableResourceBundleMessageSource;
@mkhl
mkhl / autoscoped.h
Created December 8, 2008 18:27
Objective-C macros
// GCC Attribute for autoscoped Obj-C objects
// Source: http://www.cocoabuilder.com/archive/message/cocoa/2009/3/13/232287
#define autoscoped __attribute__((cleanup(releaseObject)))
static inline void releaseObject(id *object)
{
[*object release];
}