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);
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 |
#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))) |
From 714fc294b5ade1f502c45fabab573630f09a0889 Mon Sep 17 00:00:00 2001 | |
From: Magnus Holm <judofyr@gmail.com> | |
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(-) |
# 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. |
<script>parent.postMessage("Hello world", "*")</script> | |
#!/usr/bin/env ruby | |
# | |
# Proof-of-Concept RCE exploit against Gemcutter | |
# | |
# ## Advisory | |
# | |
# ## Caveats | |
# | |
# ## Synopsis | |
# |
.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);
# Use as: sass -r ./bust_url.rb | |
require 'digest/md5' | |
module Sass::Script::Functions | |
def bust_url(url) | |
url = url.value | |
source = options[:filename] | |
dir = File.dirname(source) | |
file = File.join(dir, url) |
function loadScript(path, fn) { | |
var el = document.createElement('script') | |
, loaded = 0 | |
, onreadystatechange = 'onreadystatechange' | |
, readyState = 'readyState'; | |
el.onload = el.onerror = el[onreadystatechange] = function () { | |
if (loaded || (el[readyState] && !(/^c|loade/.test(el[readyState])))) return; | |
el.onload = el.onerror = el[onreadystatechange] = null; | |
loaded = 1; |