Skip to content

Instantly share code, notes, and snippets.

@oxbits
oxbits / .js
Created May 19, 2019 01:56 — forked from jmn/.js
React Native Apollo FlatList infinite scroll
import React from 'react';
import { Text, View, SafeAreaView, FlatList, WebView, Dimensions, Button, ScrollView} from 'react-native';
import { ListItem } from 'react-native-elements';
import ApolloClient from "apollo-boost";
import gql from "graphql-tag";
import { ApolloProvider } from "react-apollo";
import { Query } from "react-apollo";
import HTML from 'react-native-render-html';
import { createAppContainer, createStackNavigator} from 'react-navigation';
@oxbits
oxbits / App.js
Created June 11, 2017 23:19
react_4_jforaker
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
import axios from 'axios';
class FetchDemo extends Component {
constructor(props) {
super(props);
this.state = {
from inspect import currentframe as cf
from types import FunctionType as FT
(
lambda x: 1 if x <= 1 else FT(
*(
lambda y: (
y.f_code, y.f_globals
)
)(cf())
heroku run python manage.py installwatson
Running `python manage.py installwatson` attached to terminal... up, run.2260
** [Bugsnag] No API key configured, couldn't notify
Traceback (most recent call last):
File "manage.py", line 15, in <module>
execute_from_command_line(sys.argv)
File "/app/.heroku/python/lib/python2.7/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
utility.execute()
File "/app/.heroku/python/lib/python2.7/site-packages/django/core/management/__init__.py", line 377, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
@oxbits
oxbits / gist:365b9c644bf29bb726e4
Created November 12, 2014 20:57
error I was worried about:
heroku run python manage.py buildwatson
Running `python manage.py buildwatson` attached to terminal... up, run.3260
** [Bugsnag] No API key configured, couldn't notify
Traceback (most recent call last):
File "manage.py", line 15, in <module>
execute_from_command_line(sys.argv)
File "/app/.heroku/python/lib/python2.7/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
utility.execute()
File "/app/.heroku/python/lib/python2.7/site-packages/django/core/management/__init__.py", line 377, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
"SizesDownloadableImages": [
{
"FileSizeInBytes": 196868,
"InchesHeight": 2.95,
"InchesWidth": 3.96,
"MimeType": "image/jpeg",
"PixelHeight": 884,
"PixelWidth": 1189,
"ResolutionDpi": 300,
"SizeKey": "TSFULB"
@oxbits
oxbits / gist:1d30bd8f7fb51836071d
Last active August 29, 2015 14:03
AttributeError at /rest-auth/register/ 'NoneType' object has no attribute '_meta'
AttributeError at /rest-auth/register/
'NoneType' object has no attribute '_meta'
Request Method: GET
Request URL: http://localhost:8000/rest-auth/register/
Django Version: 1.6.5
Exception Type: AttributeError
Exception Value:
'NoneType' object has no attribute '_meta'
Exception Location: /vagrant/altaipsum/rest_auth/serializers.py in Meta, line 44
Python Executable: /usr/bin/python
AttributeError at /rest-auth/register/
'NoneType' object has no attribute '_meta'
Request Method: GET
Request URL: http://localhost:8000/rest-auth/register/
Django Version: 1.6.5
Exception Type: AttributeError
Exception Value:
'NoneType' object has no attribute '_meta'
Exception Location: /vagrant/altaipsum/rest_auth/serializers.py in Meta, line 44
Python Executable: /usr/bin/python
/dev/sda1 on / type ext4 (rw)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/cgroup type tmpfs (rw)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
@oxbits
oxbits / gist:5504214
Created May 2, 2013 18:22
extended admin/change_list.html
{% extends "admin/change_list.html" %}
{% block extrastyle %}
{{ block.super }}
<style>
#result_list tr td:nth-child(5) {text-align:right}
#result_list tr td:nth-child(6) {text-align:right}
#result_list tr td:nth-child(7) {text-align:right}
</style>
{% endblock %}