Skip to content

Instantly share code, notes, and snippets.

@MarcusRiemer
MarcusRiemer / pg_dump.rake
Last active March 23, 2021 09:31 — forked from chetan/db.rake
Rails rake tasks for dump & restore of PostgreSQL databases
# Original source: https://gist.github.com/hopsoft/56ba6f55fe48ad7f8b90
# Merged with: https://gist.github.com/kofronpi/37130f5ed670465b1fe2d170f754f8c6
#
# This is the code from the comment:
# https://gist.github.com/hopsoft/56ba6f55fe48ad7f8b90#gistcomment-2275324
# Made into a fork/separate gist for easier download, with redundant shell-script removed.
#
#
# Usage:
#
### Keybase proof
I hereby claim:
* I am MarcusRiemer on github.
* I am marcusriemer (https://keybase.io/marcusriemer) on keybase.
* I have a public key whose fingerprint is 8188 3C05 9155 1F30 A34D 8BAA E5E6 A74D 0198 4878
To claim this, I am signing this object:
<hash>
<date type="datetime">2013-06-04T15:15:54+02:00</date>
<guid>52afa47b-b63b-439e-a26f-7db82bae3145</guid>
<user-id type="integer">1</user-id>
<request>{"action"=&gt;"generate_key", "controller"=&gt;"admin/api"}</request>
<action>generate_key</action>
<controller>api</controller>
<backtrace>/private-backup/bitnami/discourse/ruby/lib/ruby/gems/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/postgresql_adapter.rb:1166:in `get_last_result'
/private-backup/bitnami/discourse/ruby/lib/ruby/gems/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/postgresql_adapter.rb:1166:in `exec_cache'
/private-backup/bitnami/discourse/ruby/lib/ruby/gems/1.9.1/gems/activerecord-3.2.12/lib/active_record/connection_adapters/postgresql_adapter.rb:663:in `block in exec_query'
#!/bin/sh
#version details
VERSION=0.8.8
PLATFORM=linux
ARCH=x86
PREFIX="$HOME/node-v$VERSION-$PLATFORM-$ARCH"
#download binaries
mkdir -p "$PREFIX" && \
/**
* "Nulls" cells of the given lightmaps that aren't visible
* because light is blocked.
*
* Code is based on:
* http://code.google.com/p/js-like/wiki/DiscreteShadowcasting
*/
_applyShadows = function(posX, posY, lightCaster, lightMap) {
var self = this;