Skip to content

Instantly share code, notes, and snippets.

<script src="http://processingjs.org/js/processing.min.js"></script>
<canvas id="processing-canvas"> </canvas>
<script type="text/processing" data-processing-target="processing-canvas">
/* @pjs preload="static/images/moon.jpg"; */
PImage img;
void setup() {
size(800, 800, P2D);
background(0);
@GabiThume
GabiThume / clock.js
Last active December 18, 2015 00:59
<script src="http://processingjs.org/js/processing.min.js"></script>
<canvas id="processing-canvas"> </canvas>
<script type="text/processing" data-processing-target="processing-canvas">
Clock c1, c2, c3, c4, c5, c6;
float coluna;
ArrayList clocks;
int sizeClock=30, sizeX=800, sizeY=800;
void setup(){
@GabiThume
GabiThume / test_forgot_password.py
Last active December 17, 2015 14:19
Functional test for ticket http://issues.mediagoblin.org/ticket/689 using Selenium WebDriver.
import pytest
from selenium import webdriver
def test_forgot_password():
drivers = []
drivers.append(webdriver.Firefox())
drivers.append(webdriver.Chrome())
for driver in drivers:
driver.get("http://127.0.0.1:6543/auth/login")
assert "MediaGoblin" in driver.title
@GabiThume
GabiThume / gist:5595096
Last active December 17, 2015 10:29
mediagoblin on FreeNode IRC log on May 06 about selenium/phantonjs
May 06 16:46:47 <gabithume> paroneayea, Hi! I was looking to PhantonJS because ticket #458 and I was thinking about trying casperJS (http://casperjs.org/) for high-level functional tests, should I create some tests on mediagoblin repos?
May 06 16:48:20 * LotusEcho (~LotusEcho@2620:0:2820:1400:20c2:ffa1:f60f:b7be) has joined #mediagoblin
May 06 16:51:09 * BjarniRunar has quit (Ping timeout: 252 seconds)
May 06 16:51:48 <paroneayea> hey gabithume
May 06 16:51:49 <paroneayea> looking
May 06 16:52:50 <paroneayea> gabithume: hm, what would casperjs give us that we wouldn't have with phantomjs?
May 06 16:52:57 <paroneayea> (also, what do you think of selenium?)
May 06 17:05:30 * AndChat|511 (~androbug@pdpc/supporter/active/thelovebug) has joined #mediagoblin
May 06 17:05:32 * AndroBug has quit (Read error: Connection reset by peer)
May 06 17:06:11 * AndChat-511 (~androbug@pdpc/supporter/active/thelovebug) has joined #mediagoblin
def test_topcrasher(self, rget, rpost):
# first without a version
no_version_url = reverse('crashstats.topcrasher',
args=('Firefox',))
url = reverse('crashstats.topcrasher',
args=('Firefox', '19.0'))
has_builds_url = reverse('crashstats.topcrasher',
args=('Firefox', '19.0', 'build'))
response = self.client.get(no_version_url)
ok_(url in response['Location'])
<Elrond> paroneayea - Hi back. [13:42]
<paroneayea> hey Elrond !
<Elrond> paroneayea - Reprocessing? [13:44]
<paroneayea> Elrond: yeah, let's talk about it :) [13:45]
ERC> /query joar [13:46]
<Elrond> I think, it's quite easy, IF media-types use the proc_state tools.
[13:47]
<Elrond> proc_state.get_queue_file() -- get from queue for normal, get from
main storage for reprocessing.
<Elrond> proc_state.delete_queue_file() -- delete if the queufile was on the
# GNU MediaGoblin -- federated, autonomous media hosting
# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
{"hits": {"WaterWolf": [{"product": "WaterWolf", "throttle": 100.0, "end_date": "2013-05-28", "featured": true, "version": "5.0a1", "release": "Nightly", "has_builds": true, "start_date": "2013-03-26"}, {"product": "WaterWolf", "throttle": 100.0, "end_date": "2013-05-28", "featured": true, "version": "4.0a2", "release": "Aurora", "has_builds": true, "start_date": "2013-03-26"}, {"product": "WaterWolf", "throttle": 100.0, "end_date": "2013-05-28", "featured": false, "version": "4.0a1", "release": "Nightly", "has_builds": true, "start_date": "2013-03-26"}, {"product": "WaterWolf", "throttle": 100.0, "end_date": "2013-05-28", "featured": false, "version": "3.0a2", "release": "Aurora", "has_builds": true, "start_date": "2013-03-26"}, {"product": "WaterWolf", "throttle": 10.0, "end_date": "2013-08-27", "featured": true, "version": "2.1", "release": "Release", "has_builds": false, "start_date": "2013-04-23"}, {"product": "WaterWolf", "throttle": 10.0, "end_date": "2013-08-27", "featured": false, "version": "2.0", "
@GabiThume
GabiThume / error
Created April 23, 2013 04:24
error in permission
======================================================================
FAIL: test_util_versions_info (socorro.unittest.middleware.test_middleware_app.TestMiddlewareApp)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/chs/Desktop/CODE/repos/socorro/socorro/unittest/middleware/test_middleware_app.py", line 868, in test_util_versions_info
'/util/versions_info/versions/Firefox:9.0a1+Fennec:7.0/'
File "/Users/chs/Desktop/CODE/repos/socorro/socorro/unittest/middleware/test_middleware_app.py", line 298, in get
response = a.get(url, expect_errors=expect_errors)
File "/Users/chs/Desktop/CODE/repos/socorro/socorro-virtualenv/lib/python2.6/site-packages/paste/fixture.py", line 208, in get
return self.do_request(req, status=status)