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 heavily on https://bitbucket.org/zombiezen/spdy, adapted for | |
// recent Go releases. | |
package main | |
import ( | |
"crypto/tls" | |
"fmt" | |
"go.net/spdy" | |
"io" |
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
package main | |
import ( | |
"log" | |
"net/http" | |
"os" | |
"fmt" | |
) | |
// Environment variables |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>org.glassfish.hk2</groupId> | |
<artifactId>ctm-example</artifactId> | |
<version>2.1.93</version> | |
<name>ctm-example</name> |
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
package com.ontometrics.util; | |
import java.util.Calendar; | |
import java.util.Date; | |
/** | |
* Provides a fluent builder interface for constructing Dates and DateTimes. | |
*/ | |
public class DateBuilder { |
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
# Initial setup | |
git clone -o framework -b develop https://github.com/laravel/laravel.git project-name | |
cd project-name | |
git checkout --orphan master | |
git commit -m "Initial commit" | |
# Pulling changes | |
git fetch framework | |
git merge --squash -m "Upgrade Laravel" framework/develop | |
# Fix merge conflicts if any and commit |
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 Fancy = require('FancyModule'); | |
var mod = new Fancy(); | |
mod.on('success', function(data) { | |
console.log(data); // { this_is_fancy:'indubitably' } | |
}); |
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 | |
class HookController extends Zend_Controller_Action { | |
public function preDispatch() { | |
$this->_helper->viewRenderer->setNoRender(true); | |
if (!$this->_request->isPost()) { | |
throw new Exception('POST required'); | |
} |
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
# loggly | |
source s_all { | |
file ("/proc/kmsg" log_prefix("kernel: ")); | |
unix-stream ("/dev/log"); | |
internal(); | |
file("/mnt/log/apache2/error.log" follow_freq(1) flags(no-parse)); | |
}; | |
destination d_loggly { | |
tcp("logs.loggly.com" port(14791)); |
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
# /etc/rsyslog.conf Configuration file for rsyslog. | |
# | |
# For more information see | |
# /usr/share/doc/rsyslog-doc/html/rsyslog_conf.html | |
# | |
# Default logging rules can be found in /etc/rsyslog.d/50-default.conf | |
################# | |
#### MODULES #### |
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 is a config sample for log normalization, but can | |
# be used as a more complex general sample. | |
# It is based on a plain standard rsyslog.conf for Red Hat systems. | |
# | |
# NOTE: Absolute path names for modules are used in this config | |
# so that we can run a different rsyslog version alongside the | |
# regular system-installed rsyslogd. Remove these path names | |
# for production environment. | |
#### MODULES #### |