This file contains 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
# Description: Boxstarter Script | |
# Author: Jess Frazelle <jess@linux.com> | |
# Last Updated: 2017-09-11 | |
# | |
# Install boxstarter: | |
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force | |
# | |
# You might need to set: Set-ExecutionPolicy RemoteSigned | |
# | |
# Run this boxstarter by calling the following from an **elevated** command-prompt: |
This file contains 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 | |
# | |
# yoga-auto-rotate -- ghetto-style tablet mode, with keyboard and all. | |
# | |
# Simple little script that will detect an orientation change for a | |
# Lenovo Yoga 13 (very hackily) and adjust the active display's | |
# orientation and disable/enable the touchpad as necessary. | |
# | |
# The Yoga 13 will emit keycode `e03e` at one second intervals | |
# when the screen is flipped into tablet mode. Since this keycode |
This file contains 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 jinja2 import Template | |
>>> tmpl = """{% if name != "Jeff" %}Nothing to see here move along{% else %} | |
... hello {{name}}, how are you?{% endif %}""" | |
>>> template = Template(tmpl) | |
>>> print template.render({"name": "Jeff"}) | |
hello Jeff, how are you? | |
>>> print template.render({"name": "John"}) | |
Nothing to see here move along | |
>>> |