Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

this['👞👞'] = 30 / 3.0;
this['👞'] = this['👞👞'] / 2;
console.assert(this['👞👞'] + this['👞👞'] + this['👞👞'] === 30);
this['😼'] = (20 - this['👞👞']) / 2.0;
console.assert(this['😼'] + this['😼'] + this['👞👞'] === 20);
this['🍦🍦'] = (13 - this['😼']) / 2.0;
@pixelcort
pixelcort / index.html
Last active May 9, 2016 14:45
f5f5f5
<!DOCTYPE html>
<html>
<head>
<title>f5f5f5</title>
<script>
window.addEventListener('load', function() {
var reloadCounterInitial = 10;
var reloadCounter = reloadCounterInitial;
document.body.addEventListener('input', function(event) {
if (event.target.type === 'range') {
function FindProxyForURL (url, host) {
if (host == "www.googletagmanager.com") return "PROXY 127.0.0.1:80";
return "DIRECT";
}
# coding=UTF-8
#k=u"私は疲れた"
#h=u"わたしはつられた"
import re
def rubyForString(k, h):
expression = u'([^\u3040-\u30ff]*)([\u3040-\u30ff]*)([^\u3040-\u30ff]*)([\u3040-\u30ff]*)([^\u3040-\u30ff]*)([\u3040-\u30ff]*)([^\u3040-\u30ff]*)([\u3040-\u30ff]*)'
@pixelcort
pixelcort / 0openingTwoDatabases.js
Created August 8, 2012 07:27
PouchDB scalability tests
Pouch('idb://alpha', function(err, alpha) {
if (err) throw err;
console.log('a of b');
Pouch('idb://beta', function(err, beta) {
if (err) throw err;
window.alpha = alpha;
window.beta = beta;
console.log('dbs ready');
});
@pixelcort
pixelcort / gist:1820866
Created February 13, 2012 22:04
relationships using DS.Store#filter
App.FirstModel = DS.Model.extend({
foreignUnsorted: function() {
return App.store.filter(App.ForeignModel, function(hash) {
return false;
});
}.property().cacheable(),
foreign: function() {
var foreignUnsorted = this.get('foreignUnsorted');
return foreignUnsorted.toArray().sort(function(a,b) {
@pixelcort
pixelcort / ember-data.20120126.js
Created January 26, 2012 19:50
A copy of ember-data.js
(function(exports) {
window.DS = Ember.Namespace.create();
})({});
(function(exports) {
DS.Adapter = Ember.Object.extend({
commit: function(store, commitDetails) {
App.Car = SC.Record.extend({
name: SC.Record.attr(String),
dealership: SC.Record.attr(App.Dealership),
// For some reason we need this computed property to make SC.Query work
dealershipGuid: function() {
return this.get('dealership').get('guid');
}.property('dealership').cacheable()
}) ;
asset1 = Shared.store.createRecord(Shared.Asset, {title: "Test Asset",kind:"text/plain"});
placement1 = Shared.store.createRecord(Shared.Placement, {location: 0, asset: asset1.storeKey});
placement1.get("asset").storeKey == asset1.storeKey; // Returns false. Should return true.