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
"GistID:6368066 | |
set nocompatible " be iMproved | |
filetype off " required! | |
set rtp+=~/.vim/bundle/vundle/ | |
call vundle#rc() | |
" let Vundle manage Vundle | |
" required! |
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 network | |
import ( | |
"bytes" | |
"github.com/Blackrush/gofus/protocol" | |
"io" | |
"log" | |
"net" | |
) |
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 network | |
import ( | |
"database/sql" | |
"github.com/Blackrush/gofus/login/db" | |
"github.com/Blackrush/gofus/protocol/msg" | |
"github.com/Blackrush/gofus/shared" | |
"log" | |
) |
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 shared | |
import ( | |
"strings" | |
) | |
const alphanum = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_" | |
func Split2(in, sep string) (string, string) { | |
res := strings.SplitN(in, sep, 2) |
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 network | |
import ( | |
"database/sql" | |
"github.com/Blackrush/gofus/login/db" | |
"github.com/Blackrush/gofus/protocol/msg" | |
"github.com/Blackrush/gofus/protocol/types" | |
"github.com/Blackrush/gofus/shared" | |
"log" | |
"time" |
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
if exists("b:did_ftplugin_go_install") | |
finish | |
endif | |
function! GocodeCompletePkg(arg, cmd, index) | |
return a:arg.'+'.a:cmd.'+'.a:index | |
let s:dirs=split(glob(DirName(@%), a:arg.'*'), '\n') | |
let s:ndirs=len(s:dirs) |
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
if exists("b:did_ftplugin_go_install") | |
finish | |
endif | |
function! GocodeCompletePkg(arg, cmd, index) | |
let s:base=DirName(@%) | |
let s:dirs=filter(split(globpath(s:base, a:arg.'*'), '\n'), 'isdirectory(v:val)') | |
let s:ndirs=len(s:dirs) | |
if s:ndirs <= 0 |
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 org.photon.common | |
import java.util.Random | |
object Strings { | |
val alphanum = 'a' to 'z' | |
def rand(implicit rnd: Random): Char = alphanum(rnd.nextInt(alphanum.length)) | |
def rand(n: Int)(implicit rnd: Random): String = (0 to n).foldLeft("") { (res, _) => res + rand } | |
} |
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 backend | |
import ( | |
"fmt" | |
"github.com/Blackrush/gofus/protocol" | |
"io" | |
"math" | |
"time" | |
) |
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 org.elves | |
import scala.concurrent.{Promise, Future, ExecutionContextExecutorService} | |
import java.nio.channels.{SelectionKey, ServerSocketChannel, Selector} | |
import java.net.SocketAddress | |
import scala.collection.mutable | |
import scala.beans.BeanProperty | |
class TcpService(addr: SocketAddress, executorFactory: () => ExecutionContextExecutorService) extends Service { | |
import JavaConversions.runnable |