If you configure git like this:
git config filter.sqlite3.clean 'sqlite3 %f .dump'
git config filter.sqlite3.smudge 'sqlite3 %f'
echo '*.db filter=sqlite3' >> .git/info/attributes
and you have an sqlite3 database in a *.db file:
If you configure git like this:
git config filter.sqlite3.clean 'sqlite3 %f .dump'
git config filter.sqlite3.smudge 'sqlite3 %f'
echo '*.db filter=sqlite3' >> .git/info/attributes
and you have an sqlite3 database in a *.db file:
Note: everything here is pretty specific to my usage/accounts and not written for public use... You'll probably have to tweak a bunch of stuff.
$ bean-extract config.py ~/Downloads # the csvs should be in here| #!/usr/bin/env ruby | |
| require 'open-uri' | |
| require 'time' | |
| require 'json' | |
| class Runner | |
| def initialize | |
| @base = "http://192.168.0.10/DCIM/100OLYMP" |
| #!/bin/bash | |
| live_dir="/path/to/live/site" | |
| dev_dir="/path/to/dev/site" | |
| while read oldrev newrev ref | |
| do | |
| branch=`echo $ref | cut -d/ -f3` | |
| if [ "master" == "$branch" ]; then |
| -- Thunderbird Launcher app | |
| -- Mounts a disk image before launching Thunderbird, and unmounts it when Thuderbird closes | |
| -- by Caesar Schinas, based on ideas at http://hintsforums.macworld.com/showthread.php?t=26597 | |
| on run | |
| set diskname to "Thunderbird Profile" | |
| set diskpath to "~/Library/Thunderbird/Profiles/Thunderbird Profile.sparsebundle" | |
| set itemname to "/Applications/Thunderbird" | |
| tell application "Finder" | |
| if not (exists the disk diskname) then |
| # A simple Makefile alternative to using Grunt for your static asset compilation | |
| # | |
| ## Usage | |
| # | |
| # $ npm install | |
| # | |
| # And then you can run various commands: | |
| # | |
| # $ make # compile files that need compiling | |
| # $ make clean all # remove target files and recompile from scratch |
| #!/bin/bash | |
| # | |
| # post-update hook for Hub git repo | |
| # http://stackoverflow.com/questions/5753346/git-automatically-push-to-dev-and-production-from-central-repository-depending-o?rq=1 | |
| # post-update only receives refname | |
| # TODO: adjust for post-update ref, and cd to Prime and pull | |
| # | |
| livepath="/path/to/your/live" | |
| devpath="/path/to/your/dev" | |
| while read oldrev newrev ref |
| # From Rails | |
| def simple_format(text, html_options={}) | |
| start_tag = '<p>' | |
| text = text.to_s.dup | |
| text.gsub!(/\r\n?/, "\n") # \r\n and \r -> \n | |
| text.gsub!(/\n\n+/, "</p>\n\n#{start_tag}") # 2+ newline -> paragraph | |
| text.gsub!(/([^\n]\n)(?=[^\n])/, '\1<br />') # 1 newline -> br | |
| text.insert 0, start_tag | |
| text << "</p>" | |
| end |