Skip to content

Instantly share code, notes, and snippets.

View bborysenko's full-sized avatar

Borys Borysenko bborysenko

View GitHub Profile
#!/bin/sh
#
###
# This script configures Upstart and Nginx to support your OTRS install with
# fcgi.
#
# You should configure the group as which your webserver runs (usually www-data
# for Ubuntu), the homedirbase for your users (usually /home) and the directory
# where you want your sockets created (/var/run/otrs by default).
#

How To

  1. Install homebrew if you don't have it already: http://mxcl.github.com/homebrew/
  2. Run brew install vpnc --hybrid
  3. Check if you already have virtual tunnel interfaces, run ls /dev/tun*. If there are none, install "Tun Tap OSX" (see below)
  4. Go to https://www.rz.uni-konstanz.de/angebote/e-mail/usermanager/ and login, then download both the certificate (you need the .pem file) and vpn profile
  5. Run openssl x509 -in <certificateFile>.pem -noout -hash
  6. Rename <certificateFile>.pem to the output of (5) with .pem as extension
  7. Move the .pem certificate to a permanent location, e.g. /etc/ssl/certs/
  8. Open /usr/local/etc/vpnc/default.conf in your favorite text editor, delete the contents
  9. Run pcf2vpnc /.pcf and paste the output to your open text editor

Git Quick-Start Notes by Blake Rohde, 2013

Create the repository on the server

$ mkdir PROJECT.git

CentOS Server Setup

Initial Setup

  1. Copy firewall shell script and modify it accordingly. Run it.
  2. Run $ su -c 'visudo' and add USERNAME ALL=(ALL) ALL for each allowed USERNAME.
  3. Update the system: $ sudo yum upgrade.
  4. Add the RHEL EPEL Repo:
#!/bin/bash
#WTFPL 2013 "napcae" Chi Trung Nguyen
#
#just put in your values here
#You can find the client_id and api_key in your DO dashboard
#To get the domain_id and record_id use just paste this in a browser and copy the values:
#domain_id: https://api.digitalocean.com/domains?client_id=[your_client_id]&api_key=[your_api_key]
#record_id: https://api.digitalocean.com/domains/[domain_id]/records?client_id=[your_client_id]&api_key=[your_api_key]
#see https://api.digitalocean.com/ for more information
######################################################################################################################
<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="robots" content="noodp, noydir" />
<link rel="dns-prefetch" href="//cdnjs.cloudflare.com">
<link rel="canonical" href="http://mysite.com/" />
<link rel="stylesheet" href="http://mysite.com/style.css" type="text/css" />
<!doctype html>
<html>
<head>
<meta charset=utf-8">
<link href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css" rel="stylesheet">
<link href="http://twitter.github.com/bootstrap/assets/css/bootstrap-responsive.css" rel="stylesheet">
<style>

Nginx FastCGI cache

Example /etc/nginx/nginx.conf using FastCGI (e.g. to PHP-FPM) with FastCGI cache enabled. This will capture returned data and persist it to a disk based cache store for a configurable amount of time, great for robust full page caching.

Will need to create a directory to hold cache files, for the example given here that would be:

$ sudo mkdir -p /var/cache/nginxfastcgi
$ chown www-data: /var/cache/nginxfastcgi
# knife cheat
## Search Examples
knife search "name:ip*"
knife search "platform:ubuntu*"
knife search "platform:*" -a macaddress
knife search "platform:ubuntu*" -a uptime
knife search "platform:ubuntu*" -a virtualization.system
knife search "platform:ubuntu*" -a network.default_gateway