This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function getCSRFToken() { | |
| var cookieValue = null; | |
| if (document.cookie && document.cookie != '') { | |
| var cookies = document.cookie.split(';'); | |
| for (var i = 0; i < cookies.length; i++) { | |
| var cookie = jQuery.trim(cookies[i]); | |
| if (cookie.substring(0, 10) == ('csrftoken' + '=')) { | |
| cookieValue = decodeURIComponent(cookie.substring(10)); | |
| break; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from django.contrib import admin as django_admin | |
| from ratelimitbackend import admin | |
| django_admin.autodiscover() | |
| for admin_site in django_admin.site._registry.items(): | |
| if not admin_site[0] in admin.site._registry: | |
| admin.site.register(admin_site[0], admin_site[1].__class__) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ADMINS = ( | |
| ('Yourname', 'yourname@gmail.com'), | |
| ) | |
| MANAGERS = ADMINS | |
| FROM_EMAIL = ADMINS[0][1] | |
| EMAIL_SUBJECT_PREFIX = '[dev yourproject] ' | |
| EMAIL_HOST = 'smtp.gmail.com' | |
| EMAIL_HOST_USER = FROM_EMAIL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| PYTHONVER=2.7 | |
| PYTHON=python${PYTHONVER} | |
| mkdir -p $HOME/{bin,tmp,lib/$PYTHON} | |
| easy_install-${PYTHONVER} pip | |
| pip2.7 install virtualenv --no-use-wheel | |
| pip2.7 install --install-option="--user" virtualenvwrapper --no-use-wheel | |
| # Update $HOME/.bashrc with appropriate environment variables | |
| echo 'export PATH="$HOME/bin:$PATH"' >> $HOME/.bashrc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Bar, React, Reapp, View } from 'reapp-kit'; | |
| export default Reapp(React.createClass({ | |
| contextTypes: { | |
| router: React.PropTypes.func | |
| }, | |
| getActiveBar() { | |
| let currentPath = this.context.router.getCurrentPath(); | |
| if (currentPath.indexOf(this.context.router.makePath('shop')) === 0) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import '../theme'; | |
| import { React, Reapp, View } from 'reapp-kit'; | |
| export default Reapp(React.createClass({ | |
| styles: { | |
| height: '100%' | |
| }, | |
| render() { | |
| return ( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| query { | |
| products { | |
| id | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Component1 extends React.Component { | |
| static propTypes = { | |
| some: React.PropTypes.bool, | |
| prop: React.PropTypes.string, | |
| types: React.PropTypes.object, | |
| } | |
| } | |
| class Component2 extends React.Component { | |
| static propTypes = { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Verifying that +mbrochh is my blockchain ID. https://onename.com/mbrochh |