Skip to content

Instantly share code, notes, and snippets.

View ilyakam's full-sized avatar

Ilya Kaminsky ilyakam

View GitHub Profile
@ilyakam
ilyakam / simulation_proof.js
Created April 6, 2021 18:33
Solve this challenge to prove that we live in a simulation
const simulator_cpu_delay_in_milliseconds = 1000;
function run_simulation () {
// Figure out the value of `simulator_cpu_delay_in_milliseconds`.
// You may not reference it directly nor access any global objects
// such as `Date()` or `console.time()` that aren't specifically
// declared within the scope of this `run_simulation()` function.
}
setInterval(run_simulation, simulator_cpu_delay_in_milliseconds);
$routeProvider
.when('/', {
resolve: {
user: function() {
return 'user_id';
}
}
});
var someState = {
resolve: {
user: function() {
return 'user_id';
}
}
};
$stateProvider.state(someState);
$modal.open({
resolve: {
value: function() {
return _this.value;
}
}
});