- nylas/N1 💌 An extensible desktop mail app built on the modern web.
- black-screen/black-screen A terminal emulator for the 21st century.
- shockone/black-screen A terminal emulator for the 21st century.
- ptmt/react-native-macos React Native for macOS
- docker/kitematic Visual Docker Container Management on Mac & Windows
- kitematic/kitematic Visual Docker Container Management on Mac & Windows
- davezuko/wirk-starter Get started with React, Redux, and React-Router!
- TelescopeJS/Telescope 🔭 An open-source social news app built with Meteor & React
- coryhouse/react-slingshot React + Redux starter kit / boile
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
"use strict"; | |
const currency = (total) => parseFloat(Math.round(total * 100) / 100).toFixed(2); | |
const compare = (key, order='acs') => (a, b) => { | |
if (!a.hasOwnProperty(key) || !b.hasOwnProperty(key)) return 0; | |
const A = (typeof a[key] === 'string') ? a[key].toUpperCase() : a[key]; | |
const B = (typeof b[key] === 'string') ? b[key].toUpperCase() : b[key]; |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>Cart</title> | |
</head> | |
<body> | |
<ul class="sub-menu"> |
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
[ | |
{ | |
"id":"0", | |
"name":"Bow Tie", | |
"description":"These coasters roll all of the greatest qualities into one: class, leather, and octocats.", | |
"price":18, | |
"oldprice":20, | |
"picture":["images/00_1.jpg","images/00_2.jpg","images/00_3.jpg"], | |
"quantity":10, | |
"category":"Ties", |
The client is a refactoring of the Websocket test found at: http://websocket.org/echo.html The server is a simple node.js Socket.io server which responds to the client's 'test' event, by responding with the client connection id.
See http://cliffordhall.com/2016/10/persistent-connections-with-socket-io/
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 smtplib | |
from string import Template | |
from email.mime.multipart import MIMEMultipart | |
from email.mime.text import MIMEText | |
MY_ADDRESS = '[email protected]' | |
PASSWORD = 'mypassword' |
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.db.models.fields.files import ImageField, ImageFieldFile | |
from PIL import Image | |
import os | |
def _add_thumb(s): | |
""" | |
Modifies a string (filename, URL) containing an image filename, to insert | |
'.thumb' before the file extension (which is changed to '.jpg'). | |
""" | |
parts = s.split('.') |
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 http://vanderwijk.info/blog/adding-css-classes-formfields-in-django-templates/#comment-1193609278 | |
from django import template | |
register = template.Library() | |
@register.filter(name='add_attributes') | |
def add_attributes(field, css): | |
attrs = {} | |
definition = css.split(',') |
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.db import models | |
class AppQueryset(models.QuerySet): | |
pass | |
class AppManager(models.Manager): | |
queryset_class = AppQuerySet | |
def get_queryset(self): | |
return self.queryset_class(self.model) |
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
""" | |
Logical deletion for Django models. Uses is_void flag | |
to hide discarded items from queries. Overrides delete | |
methods to set flag and soft-delete instead of removing | |
rows from the database. | |
""" | |
from django.apps import apps | |
from django.contrib.admin.utils import NestedObjects | |
from django.db import models | |
from django.db.models import signals |
NewerOlder