Skip to content

Instantly share code, notes, and snippets.

from django.conf import settings
from django.utils.translation import string_concat, ugettext_lazy
from django.utils.html import strip_tags
from haystack import indexes, site
from cms.models.managers import PageManager
from cms.models.pagemodel import Page
from cms.models.pluginmodel import CMSPlugin
@malarkey
malarkey / Contract Killer 3.md
Last active April 16, 2024 21:44
The latest version of my ‘killer contract’ for web designers and developers

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008

…………………………

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).

@almost
almost / async-await-lightning-talk.md
Last active September 12, 2019 09:07
Reactive 2015 Lightning Talk Proposal: Pyramids be gone!: ES7 Async Function

This is a proposal for a lightning talk at the Reactive 2015 conference.

NOTE: If you like this, star ⭐ the Gist - the amount of stars decides whether it makes the cut! You could also Retweet if you want :)

Pyramids be gone!

ES7 Async Functions

JavaScript is getting async functions (or already has them if you count Babel.JS) and with them a way to finally slay the evil pyramid. This new language feature lets you write asynchronous code that almost looks synchronous, while maintaining the same semantics as promises. This lets you shed your .then and .catch boilerplate and escape those nested callbacks in favour of clean, explicit, maintainable code.

@almost
almost / proposal.md
Last active September 12, 2019 09:07
Reactive 2016 Lightning Talk Proposal: Get Flow

This is a proposal for a lightning talk at the Reactive 2016 conference.

NOTE: If you like this, star ⭐ the Gist - the amount of stars decides whether it makes the cut! You could also Retweet if you want :)

Get Flow

Type checking JavaScript with Flow

JavaScript is a dynamic language, and there's nothing wrong with that. It allows quick iteration and lowers barriers. However, sometimes some compile-time type checking is just what you need to keep your code in line and give yourself the confidence to build bigger and faster. Flow gives the best of both worlds. You can have normal JavaScript but you can also add types where they're helpful, and it adds zero cost at runtime. In this talk I'll show Flow as it applies to a Redux & React codebase.

@hakerdefo
hakerdefo / sources.list
Created June 11, 2023 18:47
Debian 12 "bookworm" complete sources.list
deb https://ftp.debian.org/debian/ bookworm contrib main non-free non-free-firmware
# deb-src https://ftp.debian.org/debian/ bookworm contrib main non-free non-free-firmware
deb https://ftp.debian.org/debian/ bookworm-updates contrib main non-free non-free-firmware
# deb-src https://ftp.debian.org/debian/ bookworm-updates contrib main non-free non-free-firmware
deb https://ftp.debian.org/debian/ bookworm-proposed-updates contrib main non-free non-free-firmware
# deb-src https://ftp.debian.org/debian/ bookworm-proposed-updates contrib main non-free non-free-firmware
deb https://ftp.debian.org/debian/ bookworm-backports contrib main non-free non-free-firmware