- C-a == Ctrl-a
- M-a == Alt-a
:q close
:w write/saves
:wa[!] write/save all windows [force]
:wq write/save and close
# This is the entire preseed config file used on an example Lucid system. See the preseed | |
# documentation for more information on the options here. This will use US English by default. | |
# | |
# https://help.ubuntu.com/10.04/installation-guide/amd64/preseed-contents.html | |
# | |
# This preseed will automatically install Ubuntu 10.04 with default options. Understand what | |
# it is doing before you use it. | |
# | |
# Boot Options line: | |
# |
#!/bin/sh | |
# install into /etc/ppp/ip-down | |
# chmod a+x /etc/ppp/ip-down | |
source /etc/ppp/ip.config | |
case "${IPREMOTE}" in | |
${MY_IPREMOTE}) | |
/sbin/route delete ${MY_ROUTE} -interface ${IFNAME} |
#!/usr/bin/env ruby | |
BASEDIR = ENV["HOME"] + "/.git_redmine" | |
require BASEDIR + "/git_redmine" | |
include GitRedmine::Hooks | |
exit commit_msg(ARGV[0]) | |
# This is example contains the bare mininum to get nginx going with | |
# Unicorn or Rainbows! servers. Generally these configuration settings | |
# are applicable to other HTTP application servers (and not just Ruby | |
# ones), so if you have one working well for proxying another app | |
# server, feel free to continue using it. | |
# | |
# The only setting we feel strongly about is the fail_timeout=0 | |
# directive in the "upstream" block. max_fails=0 also has the same | |
# effect as fail_timeout=0 for current versions of nginx and may be | |
# used in its place. |
0. SSH to server | |
1. Edit /opt/bitnami/apps/jenkins/jenkins_home/config.xml | |
2. set userSecurity to false: <userSecurity>false</userSecurity> | |
3. delete | |
<authorizationStrategy> and <securityRealm> | |
4. /etc/init.d/bitnami restart |
################################################################## | |
# /etc/elasticsearch/elasticsearch.yml | |
# | |
# Base configuration for a write heavy cluster | |
# | |
# Cluster / Node Basics | |
cluster.name: logng | |
# Node can have abritrary attributes we can use for routing |
multiline { | |
tags => ["rails"] | |
pattern => "^Started" | |
negate => true | |
what => "previous" | |
} |
<?php | |
if (class_exists('Memcache')) { | |
$server = 'localhost'; | |
if (!empty($_REQUEST['server'])) { | |
$server = $_REQUEST['server']; | |
} | |
$memcache = new Memcache; | |
$isMemcacheAvailable = @$memcache->connect($server); | |
if ($isMemcacheAvailable) { |
Problem: When linking to the raw version of a gist, the link changes with each revision.
Solution:
To return the first file from a gist: https://gist.github.com/[gist_user]/[gist_id]/raw/
To get a file from multi–file gist: https://gist.github.com/[gist_user]/[gist_id]/raw/[file_name]