Skip to content

Instantly share code, notes, and snippets.

View vinyll's full-sized avatar
🗺️
Creating locally

Vincent Agnano vinyll

🗺️
Creating locally
View GitHub Profile
======================================================================
ERROR: test_search_limits (api.tests.test_views.SearchTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Volumes/Users/vinyll/Projects/zamboni/src/apps/api/tests/test_views.py", line 1017, in test_search_limits
assert False
File "/Volumes/Users/vinyll/Projects/zamboni/src/apps/api/tests/test_views.py", line 1017, in test_search_limits
assert False
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/bdb.py", line 46, in trace_dispatch
return self.dispatch_line(frame)
from django.contrib.auth.models import User
username = "me"
user = User.objects.get_or_create(username=username)[0]
user.email = username+"@mozilla.com"
user.set_password(user.email)
user.is_verified = True
user.is_staff = True
"Each child in an array should have a unique "key" prop. Check the render method of PanelsManager. See http://fb.me/react-warning-keys for more information." app.js:15174:2
"panels generated: " Array [ Object, Object, Object, Object, Object, Object, Object, Object, Object, Object, 4 more… ] app.js:25120:6
"children" Array [ undefined, undefined, undefined, undefined ] app.js:24737:4
"children" Array [ undefined, undefined, undefined, undefined, undefined, undefined, undefined ] app.js:24737:4
"children" Array [ undefined, undefined, undefined ]
@vinyll
vinyll / designer.html
Last active August 29, 2015 14:19
designer
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
<link rel="import" href="../paper-input/paper-input.html">
<link rel="import" href="../paper-button/paper-button.html">
<link rel="import" href="../core-field/core-field.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-input/core-input.html">
<polymer-element name="my-element">
@vinyll
vinyll / sujets.md
Last active August 29, 2015 14:21
JS avancé

Sujets divers, specifiques, intéressant à aborder lors d'une formation JS avancée.

Sujets spécifiques

  • bind, apply, call, closure
  • procedural / oop / fonctionnel
  • use strict
  • IIFE
  • lib client + serveur
  • require
@vinyll
vinyll / nav.scss
Created July 23, 2015 15:28
prepend a | in a CSS nav
ul {
li:not(:first-child) {
display: inline-block;
:before {
content: ' | ';
}
}
}
/*
We presume here that the `Pictures` collection has _url_ and _name_ attributes.
*/
Template.mypictures.helpers({
pictureAttributes: function(picture) {
var pic = picture.hash.picture;
return {
url: pic.url,
title: pic.name
};
@vinyll
vinyll / passenger-error.html
Last active August 29, 2015 14:27
Passenger is having some startup error with no explicit message
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="generator" content="Phusion Passenger">
<title>Web application could not be started</title>
<style type="text/css">
body {
font-family: Verdana, 'Bitstream Vera Sans', Arial, Sans-Serif;
font-size: 10pt;
@vinyll
vinyll / django-crossdomainxhr-middleware.py
Created March 15, 2012 09:01 — forked from vicalejuri/django-crossdomainxhr-middleware.py
Middlware to allow's your django server to respond appropriately to cross domain XHR (postMessage html5 API).
import re
from django.utils.text import compress_string
from django.utils.cache import patch_vary_headers
from django import http
from django.conf import settings
XS_SHARING_ALLOWED_ORIGINS = getattr(settings, 'XS_SHARING_ALLOWED_ORIGINS', '*')
@vinyll
vinyll / wtfjs-parseint.js
Created December 3, 2012 08:08
wtfjs parseint on big numbers
parseInt("10000000000000000", 10) + 1
//10000000000000000
parseInt("10000000000000000", 10) + 2
//10000000000000002
parseInt("10000000000000000", 10) + 3
//10000000000000004
parseInt("10000000000000000", 10) + 4
//10000000000000004
parseInt("10000000000000000", 10) + 5
//10000000000000004