Skip to content

Instantly share code, notes, and snippets.

@veldsla
veldsla / code.js
Created August 9, 2022 12:51
jQuery 0.25% issue
const jquery = require("jquery");
$ = window.$ = window.jQuery = jquery;
$(document).ready(function () {
$('#main').on('click', function() { $(this).remove()});
})
@veldsla
veldsla / index.html
Last active October 28, 2020 15:17
handsontable scope-hoisting issue
<html>
<head>
<script type="text/javascript" src="index.js"> </script>
</head>
<body>
<h1> table here</h1>
<div id="hot">
</div>
</body>
</html>
@veldsla
veldsla / bounds.rs
Created December 14, 2018 21:39
Bounds checks
#![feature(test)]
extern crate test;
use test::Bencher;
pub fn bounds() {
let mut pos = 0;
let data = vec![1,2,3,4,5,6,7,8,9,10];
loop {
let stuff = data[pos];
@veldsla
veldsla / main.rs
Last active May 15, 2018 14:48
Test for flexible CSV
extern crate csv;
extern crate serde;
#[macro_use]
extern crate serde_derive;
#[derive(Debug, Serialize, Deserialize)]
struct Test {
name: String,
start: u64,
stop: u64,
@veldsla
veldsla / jakeduppre
Created July 2, 2014 07:38
Jake concurrent duplicated prereqs
task("A", {async: true}, function() {
console.log("Started A");
var task = this;
setTimeout(function() {
console.log("Finished A");
task.complete();
}, 5000);
});
task("B", ["A"], {async: true}, function() {
console.log("Started B");
@veldsla
veldsla / jakepartest
Created July 1, 2014 15:43
Parallel prerequisites in Jake
[1,2,3,4,5,6,7,8,9,10,11,12].forEach(function(i) {
jake.exec("echo ".concat(i," > ", i, ".c"));
});
rule('.o', '.c', {async: true}, function () {
var cmd = 'cp ' + this.source + ' ' + this.name;
var task = this;
setTimeout(function() {