⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
# -*- cperl -*- | |
# | |
# Plugin to monitor memcache statistics | |
# | |
# This module has 3 seperate graph datasets: | |
# rates | |
# bytes | |
# counters | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d-i partman-auto/disk string /dev/sda | |
# Use LVM for partitioning | |
d-i partman-auto/method string lvm | |
# If one of the disks that are going to be automatically partitioned | |
# contains an old LVM configuration, the user will normally receive a | |
# warning. Preseed this away | |
d-i partman-lvm/device_remove_lvm boolean true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
update-rc.d logstash-shipper defaults | |
update-rc.d logstash-reader defaults |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Kernel sysctl configuration file for Red Hat Linux | |
# | |
# For binary values, 0 is disabled, 1 is enabled. See sysctl(8) and | |
# sysctl.conf(5) for more details. | |
# Controls source route verification | |
net.ipv4.conf.default.rp_filter = 1 | |
# Do not accept source routing | |
net.ipv4.conf.default.accept_source_route = 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
organization := "net.seratch" | |
name := "sandbox" | |
version := "0.1" | |
scalaVersion := "2.9.1" | |
libraryDependencies ++= Seq( | |
"junit" % "junit" % "4.9" withSources(), |
I thought I'd share this because it's taken me a couple of hours to work out and the documentation is not entirely clear.
First of all, the purge method used to be called purge
in Varnish 2.x but they renamed it to ban
in 3.0. Confusingly there is also a new command called purge
too! The new purge
command is much less sophisticated than ban
, as (AFAIK) it only purges exactly matched items, so basically one at a time.
If you do wish to use the new purge
you need to have some specific VCL in place. See here
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std; | |
probe default { | |
.url = "/index.html"; | |
.timeout = 30ms; | |
.interval = 2s; | |
.window = 5; | |
.threshold = 3; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# based on http://uberblo.gs/2011/06/high-performance-url-shortening-with-redis-backed-nginx | |
# using code from http://stackoverflow.com/questions/3554315/lua-base-converter | |
# "database scheme" | |
# database 0: id ~> url | |
# database 1: id ~> hits | |
# database 2: id ~> [{referer|user_agent}] | |
# database 3: id ~> hits (when id is not found) | |
# database 4: id ~> [{referer|user_agent}] (when id is not found) | |
# database 5: key "count" storing the number of shortened urls; the id is generated by (this number + 1) converted to base 62 |
OlderNewer