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
;; The Computer Language Benchmarks Game | |
;; http://shootout.alioth.debian.org/ | |
; | |
;; Adapted from the Java -server version | |
; | |
;; contributed by Marko Kocic | |
;; modified by Kenneth Jonsson, restructured to allow usage of 'pmap' | |
;; modified by Andy Fingerhut to use faster primitive math ops, and | |
;; deftype instead of defrecord for smaller tree nodes. | |
;; https://github.com/jafingerhut/clojure-benchmarks/blob/master/binarytrees/binarytrees.clj-4.clj modified by RH for 1.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
God.watch do |w| | |
w.name = "mysqld" | |
w.interval = 30.seconds # default | |
w.start = "service mysql start" | |
w.stop = "service mysql stop" | |
w.restart = "service mysql restart" | |
w.start_grace = 20.seconds | |
w.restart_grace = 20.seconds | |
w.pid_file = "/var/lib/mysql/hostname.pid" | |
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
# put in config/application.rb | |
config.to_prepare do | |
::PagesController.module_eval do | |
caches_page :show, :unless => proc {|c| c.user_signed_in? || c.flash.any? } | |
caches_page :home, :unless => proc {|c| c.user_signed_in? || c.flash.any? } | |
end | |
::Page.module_eval do | |
after_save :clear_static_caching! | |
after_destroy :clear_static_caching! |
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
var express = require('express'); | |
var redis = require('redis'); | |
const serverType = process.argv[2]; | |
const serverHost = process.argv[3]; | |
const serverPort = parseInt(process.argv[4]); | |
const redisPort = 6379; | |
const redisHost = '127.0.0.1'; |
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
# Pass in the name of the site you wich to create a cert for | |
domain_name = ARGV[0] | |
if domain_name == nil | |
puts "Y U No give me a domain name?" | |
else | |
system "openssl genrsa -out #{domain_name}.key 1024" | |
system "openssl req -new -key #{domain_name}.key -out #{domain_name}.csr -subj '/C=US/ST=NJ/L=Monroe/O=MyCompany/OU=IT/CN=#{domain_name}'" | |
system "cp #{domain_name}.key #{domain_name}.key.bak" |
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
// Extract a PAK file (from Quake 1 and 2) | |
#include <errno.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <sys/stat.h> | |
typedef struct { | |
char id[4]; |
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
#Main frontend | |
frontend app 0.0.0.0:80 | |
mode tcp | |
# allow for many connections, with long timeout | |
maxconn 200000 | |
timeout client 86400000 | |
default_backend webapp | |
# two URLs need to go to the node pubsub backend |
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
This playbook has been removed as it is now very outdated. |
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
<?php namespace App\Http\Controllers; | |
use Illuminate\Http\Request; | |
trait RestControllerTrait | |
{ | |
public function index() | |
{ | |
$m = self::MODEL; | |
return $this->listResponse($m::all()); |
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
## Found in: http://blog.firsthand.ca/2010/09/ruby-rdoc-example.html | |
# * Style guide based on Rails documention | |
module Namespace #:nodoc: don't document this | |
# Generic Namespace exception class | |
class NamespaceError < StandardError | |
end | |
# Raised when... |
OlderNewer