A collection of 70 hand-picked, web-based tools which are actually useful.
Each will generate pure CSS without the need for JS or any external libraries.
- Property Generators
- Animations
- Backgrounds
- Color Tools
- Typography
- Loaders
- Layouts
- Informative
For example, there are three eggs. The left egg is the largest and the front egg is leaning on its side. And from front to back, they are colored purple, yellow, and blue.
What? You do see purple, yellow, and blue, right? Uh... you don't? What colors do you see? Let's make sure that we are talking about the right file...The result is pretty clear: I have one picture (a PNG) that yields NINE different color sets! (Ten if you convert it to JPEG and use LCMS to render it.) The colors that you see are strictly dependent on the specific program that you use to view the image. Even something as minor as calibrating your video driver or patching your software could alter how the image is displayed.
I took me some time to figure it out, so I'm sharing this here:
import hudson.EnvVars
import org.jenkinsci.plugins.workflow.steps.EnvironmentExpander
def env = EnvironmentExpander.getEffectiveEnvironment(new EnvVars(), null, steps.getContext(EnvironmentExpander.class), null, null)
def ansiColorEnabled = 'TERM' in env
Ever used one of those fancy color palette generators? You know, the ones where you pick a starting color, tweak some options that probably include some musical jargon like "triad" or "major fourth", and are then bestowed the five perfect color swatches you should use to build your website?
tl;dr: What you actually need
- Greys : Text, backgrounds, panels, form controls — almost everything in an interface is grey.
- Primary color(s) : Most sites need one, maybe two colors that are used for primary actions, emphasizing navigation elements, etc. These are the colors that determine the overall look of a site
- Accent colors: for communicating different things to the user.
flask
httpie
requests
simplejson
botocore
scrapy
docker-compose
ansible
What are those diagrams ?
They show dependencies between the internal modules of various well-known Python libraries.
They goal is to provide a global overview of a Python project architecture, as a map of modules & packages, the top-level code abstractions.
Note that all …
I made this little app where you can create a color on the screen (or copy-paste CSS hex# color) and find out the name of the closest matching color.
Say you are generating a colored diff output with the standard difflib
Python package:
diff = difflib.ndiff(file1_lines, file2_lines)
print('\n'.join(diff))
Now, I'll show you how to write a simple color_diff
function that you can use to color your diff like this:
diff = difflib.ndiff(file1_lines, file2_lines)
diff …
I recently worked on a short website project using Django & Heroku. It was my very time using this Python framework, and I really liked it !
This is a compendium of tips & tricks that I, as a Django beginner, found quite useful :
Django enhanced shell
To install it :
pip install django …
Sometimes, it's useful to print some source code on paper. And PDF is a very common file format, that you can be sure your printer will accept, and that will let you preview the final page layout. But how to quickly perform syntax-coloring and export to PDF ?
I've been experimenting …
Disclaimer: this post was heaviliy inspired by the 2 following gists:
color_log.py
usingtermcolor
recipescolorlog.py
usingcolorama
I loved the simplicity of the first, not having to manipulate any of the logging internal API, but I prefer colorama
over termcolor
.
Without further ado, there is my solution …
This post aims to introduce a very useful tool to debug low-level issues in Python, how to enhance it and finally how to solve two annoying common problems.
1. Debugging Python with gdb
All the basics are there : https://wiki.python.org/moin/DebuggingWithGdb
Tl;dr :
gdb -p $(pgrep -f …