Skip to content

Instantly share code, notes, and snippets.

View efagerberg's full-sized avatar

Evan Fagerberg efagerberg

View GitHub Profile
@efagerberg
efagerberg / gist:b0f1392ff7a37ebbaaee
Created January 27, 2015 20:55
Local Migration Fail
Running migrations for tutorials:
- Migrating forwards to 0009_add_sbo_users_to_flag.
> tutorials:0009_add_sbo_users_to_flag
util[DEBUG] (0.024) CREATE TABLE DDL_TRANSACTION_TEST (X INT); args=None
util[DEBUG] (0.001) CREATE TABLE DDL_TRANSACTION_TEST (X INT); args=None
util[DEBUG] (0.001) DROP TABLE DDL_TRANSACTION_TEST; args=None
util[DEBUG] (0.002) SELECT "waffle_flag"."note", "waffle_flag"."everyone", "waffle_flag"."authenticated", "waffle_flag"."name", "waffle_flag"."created", "waffle_flag"."testing", "waffle_flag"."percent", "waffle_flag"."modified", "waffle_flag"."superusers", "waffle_flag"."languages", "waffle_flag"."rollout", "waffle_flag"."id", "waffle_flag"."staff" FROM "waffle_flag" WHERE "waffle_flag"."name" = 'tutorials' ; args=('tutorials',)
util[DEBUG] (0.026) SELECT "heron_account"."slug", "heron_account"."max_users", "heron_account"."billing_info_id", "heron_account"."active_subscription", "heron_account"."salesforce_id", "heron_account"."extra", "heron_account"."flagged_for_review", "hero
-------------------------------------Results for python----------------------------------------------
6/10: Page 1
10/10: Page 2
10/10: Page 3
10/10: Page 4
9/10: Page 5
-------------------------------------Results for c----------------------------------------------
4/10: Page 1
9/10: Page 2
6/10: Page 3
@efagerberg
efagerberg / gist:cee209f313b8d17cfb6a60561a00d63f
Created January 5, 2017 16:20
Update Rating Falcon QA Traceback
```In [5]: from indexer import tasks
In [6]: tasks.update_rating(body)
[DEBUG] [2017-01-05 16:19:19,757] [pysolr]: Starting request to 'http://localhost:8983/solr/collection2/select/?q=archive_id%3A9780133926040&fq=content_type%3Abook&wt=json&fl=archive_id' (get) with body ''...
[INFO] [2017-01-05 16:19:19,768] [pysolr]: Finished 'http://localhost:8983/solr/collection2/select/?q=archive_id%3A9780133926040&fq=content_type%3Abook&wt=json&fl=archive_id' (get) with body '' in 0.011 seconds, with status 200
[DEBUG] [2017-01-05 16:19:19,769] [pysolr]: Found '0' search results.
[DEBUG] [2017-01-05 16:19:19,769] [indexer.tasks]: Started indexing book: 9780133926040
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-6-6071927104ae> in <module>()
@efagerberg
efagerberg / HeadsetDetector.cs
Last active December 16, 2021 23:11
Unity script to turn on/off HMD simulator if a headset is connected/disconnected
public class HeadsetDetector : MonoBehaviour
{
private InputDeviceCharacteristics headsetCharacteristic = InputDeviceCharacteristics.HeadMounted;
private XRDeviceSimulator simulator;
private void Awake()
{
simulator = GetComponent<XRDeviceSimulator>();
simulator.enabled = true;
}