Skip to content

Instantly share code, notes, and snippets.

How to use Bundler and RubyGems on WebAssembly

# Download prebuilt ruby
curl -LO https://github.com/ruby/ruby.wasm/releases/download/2022-05-11-a/ruby-head-wasm32-unknown-wasi-full.tar.gz
tar xfz ruby-head-wasm32-unknown-wasi-full.tar.gz

# Install the same version of native ruby to avoid bundler version mismatch in "BUNDLED WITH" of Gemfile.lock
rvm install 3.2.0-preview1
rvm use 3.2.0-preview1

How to use Bundler and RubyGems on WebAssembly

# Download prebuilt ruby
curl -LO https://github.com/ruby/ruby.wasm/releases/download/2022-08-09-a/ruby-head-wasm32-unknown-wasi-full.tar.gz
tar xfz ruby-head-wasm32-unknown-wasi-full.tar.gz

# Install the same version of native ruby to avoid bundler version mismatch in "BUNDLED WITH" of Gemfile.lock
rbenv install 3.2.0-dev
rbenv local 3.2.0-dev
@shunirr
shunirr / criminal_jc.md
Last active February 26, 2024 05:51
女子中学生チケット詐欺事件

criminal_jc

@ShigeoTejima
ShigeoTejima / console.log
Created May 7, 2015 03:47
netbeas でwildfly-swarm-example-jaxrs (1.0.0.Beta1-SNAPSHOT) をmvn packageしようとしたら発生したエラー
--- wildfly-swarm-plugin:1.0.0.Alpha1:create (default) @ wildfly-swarm-example-jaxrs ---
5 07, 2015 2:23:17 午前 org.sonatype.guice.bean.reflect.Logs$JULSink warn
警告: Error injecting: org.wildfly.swarm.plugin.CreateMojo
java.lang.NoClassDefFoundError: org/eclipse/aether/RepositorySystemSession
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:2663)
at java.lang.Class.getDeclaredConstructors(Class.java:2012)
at com.google.inject.spi.InjectionPoint.forConstructorOf(InjectionPoint.java:245)
at com.google.inject.internal.ConstructorBindingImpl.create(ConstructorBindingImpl.java:98)
at com.google.inject.internal.InjectorImpl.createUninitializedBinding(InjectorImpl.java:629)
@paulirish
paulirish / bling.js
Last active April 20, 2024 17:39
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
@msukmanowsky
msukmanowsky / spark_gzip.py
Created November 14, 2014 01:32
Example of how to save Spark RDDs to disk using GZip compression in response to https://twitter.com/rjurney/status/533061960128929793.
from pyspark import SparkContext
def main():
sc = SparkContext(appName="Test Compression")
# RDD has to be key, value pairs
data = sc.parallelize([
("key1", "value1"),
("key2", "value2"),
("key3", "value3"),
@lgvalle
lgvalle / gist:3ad43349c4e0202ec147
Last active August 8, 2016 03:52
rxjava + twitter4j
public class HomePresenterImpl implements HomePresenter {
private static final String TAG = HomePresenterImpl.class.getSimpleName();
private final HomeScreen screen;
private final DataProvider provider;
private Subscription subscription1;
public HomePresenterImpl(HomeScreenImpl screen, DataProvider dataProvider) {
this.screen = screen;
this.provider = dataProvider;
}
@hayajo
hayajo / changelog_en.md
Last active April 16, 2024 12:57
ChangeLog を支える英語

ChangeLog を支える英語

ChangeLog を書く際によく使われる英語をまとめました。

ほとんど引用です。

基本形

@matope
matope / NoSQLデータモデリング技法.markdown
Created April 16, 2012 03:35
NoSQLデータモデリング技法

#NoSQLデータモデリング技法

原文:NoSQL Data Modeling Techniques « Highly Scalable Blog

I translated this article for study. contact matope[dot]ono[gmail] if any problem.

NoSQLデータベースはスケーラビリティ、パフォーマンス、一貫性といった様々な非機能要件から比較される。NoSQLのこの側面は実践と理論の両面からよく研究されている。ある種の非機能特性はNoSQLを利用する主な動機であり、NoSQLシステムによく適用されるCAP定理がそうであるように分散システムの基本的原則だからだ。一方で、NoSQLデータモデリングはあまり研究されておらず、リレーショナルデータベースに見られるようなシステマティックな理論に欠けている。本稿で、私はデータモデリングの視点からのNoSQLシステムファミリーの短い比較といくつかの共通するモデリングテクニックの要約を解説したい。

本稿をレビューして文法を清書してくれたDaniel Kirkdorfferに感謝したいと思う

@jaydonnell
jaydonnell / gist:882081
Created March 22, 2011 21:13
using ant and ivy from rake with jruby
require 'ant'
def ivy_retrieve(org, mod, rev)
ant.retrieve :organisation => org,
:module => mod,
:revision => rev,
:pattern => 'javalib/[conf]/[artifact].[ext]',
:inline => true
end