Skip to content

Instantly share code, notes, and snippets.

place holder.
@yuanotes
yuanotes / bootstrap
Last active August 29, 2015 14:03
Setup Server on Debain
echo "export LC_ALL=en_US.UTF-8" >> ~/.bashrc
export LC_ALL=en_US.UTF-8
apt-get update
apt-get install -y supervisor git subversion mercurial tmux
if [ ! -e ~/golang ]; then
mkdir ~/golang
fi
echo "export GOPATH=~/golang" >> ~/.bashrc
@yuanotes
yuanotes / blog.hs
Last active November 12, 2021 12:06
simple blog by haskell and yesod
{-# LANGUAGE OverloadedStrings, TypeFamilies, QuasiQuotes,
TemplateHaskell, GADTs, FlexibleContexts,
MultiParamTypeClasses, DeriveDataTypeable #-}
import Yesod
import Yesod.Auth
import Yesod.Form.Nic (YesodNic, nicHtmlField)
import Yesod.Auth.BrowserId (authBrowserId)
import Data.Text (Text)
import Network.HTTP.Conduit (Manager, newManager, def)
import Database.Persist.Sqlite
@yuanotes
yuanotes / CommandTProject.vim
Last active December 19, 2015 01:19
A simple script that wrap CommandT for vim to quickly index current project.
function! MyGetProjectPath(path)
python << EOF
import os
import vim
def get_project_dir(path):
find_project_file = False
while not find_project_file:
files = os.listdir(path)
if ".vimproj" in files:
find_project_file = True