Skip to content

Instantly share code, notes, and snippets.

View uolot's full-sized avatar

Tomasz Walotek uolot

View GitHub Profile
@proffalken
proffalken / Makefile
Created March 28, 2019 13:16
Platformio Makefile
# Uncomment lines below if you have problems with $PATH
#SHELL := /bin/bash
#PATH := /usr/local/bin:$(PATH)
all:
platformio -f run
upload:
platformio -f run --target upload
anonymous
anonymous / setup.py
Created January 11, 2017 17:38
setup.py template
#!/usr/bin/env python
# coding=utf-8
"""
python distribute file
"""
from __future__ import (absolute_import, division, print_function,
unicode_literals, with_statement)
@ivanoats
ivanoats / jqh.js
Created December 10, 2015 04:32
Hyperscript for jQuery
// hyperscript for jQuery
// create nested HTML elements with a DSL
// used to create reusable, interactive HTML components
//
// based on the many implentations out there like
// https://github.com/dominictarr/hyperscript
// https://github.com/Matt-Esch/virtual-dom/tree/master/virtual-hyperscript
// and Elm https://github.com/evancz/elm-html
var $h = function(element, properties, content) {
var $component = $('<' + element + '>');
@veselosky
veselosky / s3gzip.py
Last active May 8, 2023 21:42
How to store and retrieve gzip-compressed objects in AWS S3
# vim: set fileencoding=utf-8 :
#
# How to store and retrieve gzip-compressed objects in AWS S3
###########################################################################
#
# Copyright 2015 Vince Veselosky and contributors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
@gene1wood
gene1wood / example_aws_lambda_cloudformation_context.md
Last active January 4, 2023 06:41
Details on the AWS Lambda Python LambdaContext context object when instantiated from a CloudFormation stack

LambdaContext

Here is the raw output from examining the Python LambdaContext context object in a AWS Lambda function when called from a CloudFormation stack. More information on the context object can be found here : http://docs.aws.amazon.com/lambda/latest/dg/python-context-object.html

LambdaContext object : print(context)

<__main__.LambdaContext object at 0x7fd706780710>

LambdaContext vars : vars(context)

@jdiaz5513
jdiaz5513 / ascii_arty.py
Last active December 30, 2023 02:32
Console ASCII Art Generator
#! /usr/bin/env python2
# Requires: PIL, colormath
#
# Improved algorithm now automatically crops the image and uses much
# better color matching
from PIL import Image, ImageChops
from colormath.color_conversions import convert_color
from colormath.color_objects import LabColor
from colormath.color_objects import sRGBColor as RGBColor
@Xion
Xion / fluent.py
Created June 30, 2013 12:18
Fluent interface decorators
#!/usr/bin/env python
"""
Decorator for fluent interface classes.
"""
import functools
import inspect
def chained(method):
"""Method decorator to allow chaining."""
@jmcvetta
jmcvetta / django_2012.md
Created July 2, 2012 03:15 — forked from trey/django_2012.md
How to start a Django project in 2012

How to start a Django project in 2012

Develop on Ubuntu; Source on Github; Deploy to Heroku


Install system packages

You may already have (some of) these installed. It is best not to install Django system-wide, to avoid confusion with the Django instance that will be installed inside your virtual environment below.