Skip to content

Instantly share code, notes, and snippets.

@bravelee
bravelee / 0_reuse_code.js
Created June 13, 2014 15:47
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@bravelee
bravelee / listyourproblems.py
Created May 11, 2014 15:14
codecademy- Practice makes perfect- Listing Your Problems [11--15]
'''
codecademy- Practice makes perfect- Listing Your Problems [11--15]
'''
'''
def count(sequence,item):
found = 0
for i in sequence:
if i==item:
found = found +1
@bravelee
bravelee / Battleship.py
Last active August 29, 2015 14:00
Codecademy Battleship game
from random import randint
board = []
for x in range(5):
board.append(["O"] * 5)
def print_board(board):
for row in board:
print " ".join(row)
@bravelee
bravelee / Macvim-vimrc-bak
Created December 21, 2013 16:17
the '.vimrc' file for macvim (based on mavericks 10.9.1)
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Maintainer: amix the lucky stiff
" http://amix.dk - amix@amix.dk
"
" Version: 3.6 - 25/08/10 14:40:30
"
" Blog_post:
" http://amix.dk/blog/post/19486#The-ultimate-vim-configuration-vimrc
" Syntax_highlighted:
" http://amix.dk/vim/vimrc.html
@bravelee
bravelee / Search for Bravelee's Blog.html
Last active December 30, 2015 11:19
Search for Bravelee's Blog
<form id="search-form">
<input id="query" type="text" placeholder="正则搜索"></input>
<button type="submit" class="icon-search"></button>
</form>
<script type="text/javascript">
$(document).ready(function() {
var entries = null;
function htmlEscape(s) {
return String(s).replace(/[&<>"'\/]/g, function(s) {