This file contains hidden or 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 handlers | |
| import ( | |
| "container/list" | |
| "net/http" | |
| ) | |
| // MiddlewareType specifies middleware interface | |
| type MiddlewareType func(http.ResponseWriter, *http.Request, func(http.ResponseWriter, *http.Request)) |
This file contains hidden or 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
| /* | |
| requires libgit2 | |
| */ | |
| package main | |
| import ( | |
| "github.com/libgit2/git2go" | |
| "fmt" |
This file contains hidden or 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
| # Laravel queue worker using systemd | |
| # ---------------------------------- | |
| # | |
| # /lib/systemd/system/queue.service | |
| # | |
| # run this command to enable service: | |
| # systemctl enable queue.service | |
| [Unit] | |
| Description=Laravel queue worker |
This file contains hidden or 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
| use std::net::Ipv4Addr; | |
| use std::net::SocketAddrV4; | |
| use std::net::UdpSocket; | |
| use std::str::from_utf8; | |
| use std::thread::spawn; | |
| const MESSAGE: &'static str = "Hello, world!"; | |
| fn main() { | |
| let localhost = Ipv4Addr::new(127, 0, 0, 1); |
This file contains hidden or 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
| #!/bin/bash | |
| ## Script to install a Debian Jessie 8.0 template on Xenserver 6.5 | |
| # Add your favourite mirror here | |
| MIRROR=http://ftp.nz.debian.org/debian/ | |
| # No need to edit something below | |
| WHEEZY=$(xe template-list name-label=Debian\ Wheezy\ 7.0\ \(64-bit\) --minimal) | |
| if [[ -z $WHEEZY ]] ; then | |
| WHEEZY=$(xe template-list name-label=Debian\ Wheezy\ 7.0\ \(64-bit\)\ \(experimental\) --minimal) |