As a freelancer, I build a lot of web sites. That's a lot of code changes to track. Thankfully, a Git-enabled workflow with proper branching makes short work of project tracking. I can easily see development features in branches as well as a snapshot of the sites' production code. A nice addition to that workflow is that ability to use Git to push updates to any of the various sites I work on while committing changes.
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
[38;5;231m▄[m[38;5;231m▄[m[38;5;231m▄[m[38;5;195m▄[m[38;5;195m▄[m[38;5;195m▄[m[38;5;195m▄[m[38;5;231m▄[m[38;5;231m▄[m[38;5;231m▄[m | |
[48;5;231m [m[48;5;231m [m[48;5;195;38;5;231m▀[m[48;5;52;38;5;195m▀[m[48;5;94;38;5;195m▀[m[48;5;94m [m[48;5;136;38;5;94m▀[m[48;5;94m [m[48;5;94m [m[48;5;94;38;5;195m▀[m[48;5;52;38;5;195m▀[m[48;5;195;38;5;231m▀[m[48;5;231m [m[48;5;231m [m[38;5;231m▄[m | |
[48;5;231m [m[48;5;159;38;5;231m▀[m[48;5;52;38;5;195m▀[m[48;5;52m [m[48;5;52m [m[48;5;94;38;5;136m▀[m[48;5;52;38;5;94m▀[m[48;5;94;38;5;136m▀[m[48;5;94;38;5;136m▀[m[48;5;52m [m[48;5;52m [m[48;5;52m [m[48;5;52m [m[48;5;52m [m[48;5;52m [m[48;5;52;38;5;195m▀[m[48;5;231;38;5;159m▀[m[48;5;231m [m | |
[48;5;231m [m[48;5;159m [m[48;5;195;38;5;231m▀[m[48;5;159;38;5;16m▀[m[48;5;159;38;5;16m▀[m[48;5;231;38;5;52m▀[m[48;5;231;38;5;94m▀[m[48;5;52m [m[48;5;52m [m[48;5;16m [m[48;5;16m [m[48;5;231;38;5;16m▀[m[4 |
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
<?xml version="1.0"?> | |
<!-- | |
dirlist.xslt - transform nginx's into lighttpd look-alike dirlistings | |
I'm currently switching over completely from lighttpd to nginx. If you come | |
up with a prettier stylesheet or other improvements, please tell me :) | |
--> | |
<!-- | |
Copyright (c) 2016 by Moritz Wilhelmy <mw@barfooze.de> |
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
# Image output: | |
# -r: framerate of output | |
ffmpeg -i inputfile.mp4 -r 1 -f image2 image-%3d.jpeg # one per second | |
ffmpeg -i inputfile.mp4 -frames:v 1 thumb.png # one | |
# crop=w:h:xoffset:yoffset | |
-vf "crop=610:475:835:385" | |
# scale to w:h. -1 is 'preserve aspect ratio in this dimension' -2 is 'preserve aspect ratio but keep the dimension a multiple of 2' | |
-vf 'scale=-1:min(iw\,480)' |
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
########################################################################### | |
# | |
## @file database.py | |
# | |
########################################################################### | |
import sqlite3 | |
########################################################################### | |
# |
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
/* | |
* I add this to html files generated with pandoc. | |
*/ | |
html { | |
font-size: 100%; | |
overflow-y: scroll; | |
-webkit-text-size-adjust: 100%; | |
-ms-text-size-adjust: 100%; | |
} |
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
This is free and unencumbered software released into the public domain. | |
Anyone is free to copy, modify, publish, use, compile, sell, or | |
distribute this software, either in source code form or as a compiled | |
binary, for any purpose, commercial or non-commercial, and by any | |
means. | |
In jurisdictions that recognize copyright laws, the author or authors | |
of this software dedicate any and all copyright interest in the | |
software to the public domain. We make this dedication for the benefit |
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
# Settings courtesy internet | |
# Bind C-a (Ctrl+a) to default action on tmux | |
set-option -g prefix C-a | |
unbind C-b | |
# Command sequence for nested tmux when running tmux inside another tmux, you | |
# need to send command to inner tmux | |
bind-key a send-prefix |
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/local/bin/ruby -swI . | |
# | |
# AUTOMATE UPDATING ALL PROJECTS | |
# | |
# Problem: going to each project and then pulling changes. | |
# Solution: Automate git pulling for all my projects | |
# | |
# 1. Create a pull_projects file and add the code from this gist | |
# 2. Move the file into a directory that is in your path, i.e. $PATH | |
# 3. Make the file executable, eg. chmod +x /usr/local/bin/pull_projects |