Skip to content

Instantly share code, notes, and snippets.

View jehrhardt's full-sized avatar

Jan Ehrhardt jehrhardt

View GitHub Profile
@andelf
andelf / main.rs
Created May 14, 2020 10:31
Embed Deno in Rust
use deno_core::Op;
use deno_core::ZeroCopyBuf;
use deno_core::{CoreIsolate, StartupData};
use std::str;
fn main() {
println!("v8 version: {}", deno_core::v8_version());
let mut isolate = CoreIsolate::new(StartupData::None, false);
@coudy
coudy / OctaneBenchmarkNashorn.java
Created April 3, 2014 16:43
Runs Google's Octane Benchmark using JDK8's Nashorn engine
package eu.coudy.nashorn;
import jdk.nashorn.api.scripting.NashornScriptEngine;
import javax.script.CompiledScript;
import javax.script.ScriptEngineManager;
import javax.script.ScriptException;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
@vendethiel
vendethiel / scheme.sjs
Last active January 2, 2016 01:29 — forked from disnet/scheme.sjs
scheme.sjs (forked from https://gist.github.com/disnet/3854258)
macro sexp {
rule {()} => {
;
}
rule {($p)} => {
$p
}
rule {($x $y)} => {
$x($y);
}
@emk
emk / ember-test.html
Created April 7, 2013 01:44
Testing Ember.js with Mocha, Sinon and Chai, including unit and integration tests. Runnable version available at: http://jsfiddle.net/ekidd/hCsws/13/
<!-- Mocha test output goes here. -->
<div id="mocha"></div>
<!-- Handlebars templates for our application. -->
<script type="text/x-handlebars">
<h1>Testing Ember.js with Mocha</h1>
{{outlet}}
</script>
<script type="text/x-handlebars" data-template-name="index">
@sferik
sferik / install-ruby-2.0.0.sh
Created November 5, 2012 02:28
Instructions to install on Ruby 2.0.0 on Mac OS X with homebrew
#!/usr/bin/env sh
brew update
brew install rbenv
brew install ruby-build
brew install openssl
CONFIGURE_OPTS=--with-openssl-dir=`brew --prefix openssl` rbenv install 2.0.0-preview1
@disnet
disnet / scheme.sjs
Created October 8, 2012 19:02
start of scheme in sweet.js (modified from http://pastebin.com/0nPBg8LY)
macro sexp {
case () => {
;
}
case ($p) => {
$p
}
case ($x $y) => {
$x($y);
}
;;; I prefer cmd key for meta
(setq mac-option-key-is-meta nil
mac-command-key-is-meta t
mac-command-modifier 'meta
mac-option-modifier 'none)
@jotto
jotto / google_oauth2_access_token.rb
Created June 14, 2012 21:15
ruby command line script for generating google oauth2 access token
# (create oauth2 tokens from Google Console)
client_id = ""
client_secret = ""
# (paste the scope of the service you want here)
# e.g.: https://www.googleapis.com/auth/gan
scope = ""
@tsabat
tsabat / zsh.md
Last active October 16, 2024 14:43
Getting oh-my-zsh to work in Ubuntu
@trygvis
trygvis / sbt
Created December 1, 2011 14:37
My SBT wrapper scripts
#!/bin/sh
if [ -z "$SBT_VERSION" ]
then
SBT_VERSION=0.7.7
fi
JAR=$HOME/.sbt/sbt-launch-$SBT_VERSION.jar
mkdir -p $HOME/.sbt