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
#!/usr/bin/env bash | |
set -euo pipefail | |
branch=main | |
initial_sha=SHA_OF_THE_FIRST_RELEASE | |
initial_version=1 | |
version_tag () { | |
version=$1 |
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
Section "InputClass" | |
Identifier "Disable trackpoint" | |
MatchProduct "AlpsPS/2 ALPS DualPoint Stick" | |
Option "Ignore" "on" | |
EndSection | |
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
import traceback | |
class WriteLogger(object): | |
def __init__(self, stream): | |
self.stream = stream | |
def write(self, str): | |
stack = traceback.extract_stack() | |
stack_lines = traceback.format_list(stack[:-1]) |
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
""" | |
Django middleware for generating request flame graphs. | |
Requires the flamegraph.pl perl script: | |
https://github.com/brendangregg/FlameGraph/blob/master/flamegraph.pl | |
Installation: | |
1. Create a directory for flame graphs | |
2. Copy the flamegraph.pl script to it | |
3. Add the FLAMES_DIR django setting | |
4. Add the flames.FlamesMiddleware to MIDDLEWARE_CLASSES |
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
<!DOCTYPE html> | |
<html> | |
<body ng-app="app"> | |
<ng-view></ng-view> | |
<template id='my-component-template'> | |
<style> | |
@import url('whatever...'); | |
</style> | |
</template> |
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
""" | |
Video to GIF conversion script using ffmpeg | |
based on http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html | |
""" | |
import argparse | |
import datetime | |
import os | |
import subprocess | |
import tempfile |