Due to the high usage of this guide and the lack of comfort in Gist's commenting area, I decided to make a blog post out of this which you can find here:
http://blog.frd.mn/install-os-x-10-10-yosemite-in-virtualbox/
| /*Transparent pattern placed over an image, like we see on the bootstrap homepage: http://twitter.github.com/bootstrap/index.html*/ | |
| div { | |
| width: 200px; | |
| height: 200px; | |
| display: block; | |
| position: relative; | |
| background: url(images/background-image.png); | |
| } |
Due to the high usage of this guide and the lack of comfort in Gist's commenting area, I decided to make a blog post out of this which you can find here:
http://blog.frd.mn/install-os-x-10-10-yosemite-in-virtualbox/
| # | |
| # Generate a unique integer id base on the hostname | |
| # It works by stripping $domain from the $::fqdn, | |
| # removing all characters except alphanumeric and converting to base 10 | |
| # $domain is provided if you have complex domains like *.hosting.example.com | |
| # | |
| class uniqueid ( | |
| $domain = $::domain, | |
| ) { | |
| $node_id = inline_template("<%= '$::fqdn'.gsub('$domain','').gsub(/[^a-z0-9]/i,'').to_i(36) %>") |
| sub vcl_recv { | |
| if (req.http.X-Blackfire-Query && client.ip ~ profile) { | |
| //set req.backend_hint = backend1; // if you want to disable loadbalancer to profile (aka only 1 backend needs blackfire extension | |
| return (pass); | |
| } else { | |
| // Add a Surrogate-Capability header to announce ESI support. | |
| set req.http.Surrogate-Capability = "abc=ESI/1.0"; | |
| } | |
| } |
| filter { | |
| # Capture all the generic syslog stuff and populate @timestamp | |
| if [type] == "postfix" { | |
| grok { | |
| match => [ "message", "%{SYSLOGBASE} %{GREEDYDATA:_syslog_payload}" ] | |
| singles => true | |
| } | |
| # Postfix pads single-digit numbers with spaces (WHYYYYY) | |
| mutate { gsub => [ "timestamp", " ", " 0" ] } | |
| date { match => [ "timestamp", "MMM dd HH:mm:ss"] } |
| server { | |
| listen 80; | |
| server_name backend; | |
| root /usr/share/nginx/www; | |
| index index.html index.html; | |
| location / { | |
| header_filter_by_lua ' |
| snack(~) % rm /tmp/flag | |
| snack(~) % echo "Hello" > /tmp/original | |
| snack(~) % sudo puppet apply unmanaged-notify.pp | |
| notice: /Stage[main]//File[/tmp/flag]/ensure: defined content as '{md5}09f7e02f1290be211da707a266f153b3' | |
| notice: /Stage[main]//Exec[hello world]: Triggered 'refresh' from 1 events | |
| # Won't exec 'hello world' again because no change occured to /tmp/original: | |
| snack(~) % sudo puppet apply unmanaged-notify.pp | |
| # Now change /tmp/original: |
| #!/bin/bash | |
| #------------------------------------------------------------------------------- | |
| # RECREATE DATABASE FROM DDL AND DML SCRIPTS | |
| #------------------------------------------------------------------------------- | |
| BASEDIR="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | |
| SQLDIR="${BASEDIR}/sql" | |
| PSQL_BIN="/usr/bin/psql" | |
| PG_USER="<enter_pg_user_to_connect_with>" |
$ git checkout web-123-my-branch # make sure you're on the right branch
$ git fetch # update remote refs
$ git rebase origin/master # perform the rebase onto the current state of master
# for each conflict, edit file, resolve conflicts, git add -u <file>, git rebase --continue
$ git push -f origin web-123-my-branch # overwrite remote branch with newly rebase branch
This is a collection of the most common commands I run while administering Postgres databases. The variables shown between the open and closed tags, "<" and ">", should be replaced with a name you choose. Postgres has multiple shortcut functions, starting with a forward slash, "". Any SQL command that is not a shortcut, must end with a semicolon, ";". You can use the keyboard UP and DOWN keys to scroll the history of previous commands you've run.
http://www.postgresql.org/download/linux/ubuntu/ https://help.ubuntu.com/community/PostgreSQL