ruby-install -p https://gist.githubusercontent.com/judofyr/11175629/raw/2f22144e3ca261e9e989fcb9a205b473c208007f/patch.diff ruby 2.1.1
This file contains hidden or 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
type Foo = distinct int | |
template `&`(a: Foo, b: Foo): expr = | |
debugEcho "anding" | |
const x = a | |
Foo(int(a) + int(b)) | |
echo int(Foo(1) & Foo(2) & Foo(3) & Foo(4) & Foo(5)) | |
This file contains hidden or 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
def extract_session | |
envs = ObjectSpace.each_object(Hash).lazy.select { |env| env.key?("rack.version") && env.key?("rack.session") } | |
before = envs.to_a | |
GC.disable | |
yield | |
after = (envs.to_a - before) | |
raise "Could not extract session" unless after.size == 1 | |
after.first['rack.session'] | |
ensure | |
GC.enable |
This file contains hidden or 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
#lang r5rs | |
; A lazy list is a cons of two values: a head (a value) and a tail, | |
; a lambda that returns other lazy list. It's very easy to create a | |
; closure-based implementation: | |
(define (lazy-from n) | |
(cons n (lambda () (lazy-from (+ 1 n))))) | |
(define (lazy-head lst) (car lst)) | |
(define (lazy-tail lst) ((cdr lst))) |
This file contains hidden or 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
From 714fc294b5ade1f502c45fabab573630f09a0889 Mon Sep 17 00:00:00 2001 | |
From: Magnus Holm <[email protected]> | |
Date: Mon, 6 May 2013 22:27:03 +0200 | |
Subject: [PATCH] Fix stupid bug | |
--- | |
lib/bundler/resolver.rb | 47 ++++++++----------------------------------- | |
spec/resolver/basic_spec.rb | 22 ++++++++++++++++++++ | |
2 files changed, 30 insertions(+), 39 deletions(-) |
This file contains hidden or 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
# paillier.py and primes.py attached below are verbatim from | |
# https://github.com/mikeivanov/paillier | |
# | |
# This code is licenced under # LGPL v3. | |
# | |
# Usage | |
# Person 1: python age.py MY_AGE | |
# Person 2: python age.py MY_AGE OUTPUT_FROM_PERSON1 | |
# | |
# Person 2 should then post the output here and I can publicize the relative age. |
This file contains hidden or 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
<script>parent.postMessage("Hello world", "*")</script> | |
This file contains hidden or 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
#!/usr/bin/env ruby | |
# | |
# Proof-of-Concept RCE exploit against Gemcutter | |
# | |
# ## Advisory | |
# | |
# ## Caveats | |
# | |
# ## Synopsis | |
# |
This file contains hidden or 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
.lt-ie9 .error { | |
background-image: url("images/sprites/sprite.png"); } | |
.error { | |
background-image: url("images/sprites/sprite.svg"); } |
Let's say someone has implemented a module for sets that's being used in two modules.
a.js:
var set = require("set");
export.thing = set(1, 2, 3);