Skip to content

Instantly share code, notes, and snippets.

View bitdewy's full-sized avatar

bitdewy bitdewy

  • Bytedance
  • beijing
View GitHub Profile
@bitdewy
bitdewy / format_src.py
Created April 21, 2012 11:33
format src, mormalize new line token, remove space at end of line and expand tabs
# -*- coding: UTF-8 -*-
'''
format source code
normalize newline token, remove space at end of line and expand tabs
wrote in python 3k
@Author: bitdewy (bitdewy (at) gmail.com)
'''
import locale, os, re, stat
@bitdewy
bitdewy / stars.cpp
Created August 10, 2012 10:55
openGL practice - stars
#include <iostream>
#include <map>
#include <vector>
#include <boost/bind.hpp>
#include <boost/function.hpp>
#include <boost/noncopyable.hpp>
#include <boost/scoped_array.hpp>
#include <gl/glut.h>
#include <gl/SOIL.h>
@bitdewy
bitdewy / 1.m
Last active December 15, 2015 21:29
Project Euler #1 in Object-C
//
// 1.m
// ProjectEuler
//
// Created by bitdewy on 4/6/13.
// Copyright (c) 2013 bitdewy. All rights reserved.
//
#import <Foundation/Foundation.h>
@bitdewy
bitdewy / 1.lisp
Last active December 15, 2015 21:39
Project Euler #1 in Common Lisp
;;;;
;;;; 1.lisp
;;;; ProjectEuler
;;;;
;;;; Created by bitdewy on 4/7/13.
;;;; Copyright (c) 2013 bitdewy. All rights reserved.
;;;;
;; Project Euler #1
(defun sum_of_values_multiples (max values)
@bitdewy
bitdewy / gl_practice.cpp
Created April 7, 2013 10:39
openGL practice
#include <iostream>
#include <map>
#include <vector>
#include <boost/bind.hpp>
#include <boost/function.hpp>
#include <boost/noncopyable.hpp>
#include <gl/glut.h>
#include <gl/SOIL.h>
class KeyboardManger : boost::noncopyable
@bitdewy
bitdewy / 2.lisp
Created April 7, 2013 16:55
Project Euler #2 in Common Lisp
;;;;
;;;; 2.lisp
;;;; ProjectEuler
;;;;
;;;; Created by bitdewy on 4/8/13.
;;;; Copyright (c) 2013 bitdewy. All rights reserved.
;;;;
;; Project Euler #2
(defun fibonacci (max)
@bitdewy
bitdewy / 3.lisp
Last active December 16, 2015 00:10
Project Euler #3 in Common Lisp
;;;;
;;;; 3.lisp
;;;; ProjectEuler
;;;;
;;;; Created by bitdewy on 4/9/13.
;;;; Copyright (c) 2013 bitdewy. All rights reserved.
;;;;
;; Project Euler #3
(defun factorization (number)
@bitdewy
bitdewy / 5.lisp
Created April 10, 2013 06:21
Project Euler #5 in Common Lisp
;;;;
;;;; 5.lisp
;;;; ProjectEuler
;;;;
;;;; Created by bitdewy on 4/10/13.
;;;; Copyright (c) 2013 bitdewy. All rights reserved.
;;;;
;; Project Euler #5
(defun smallest_multiple1 (max)
@bitdewy
bitdewy / 6.lisp
Created April 10, 2013 12:02
Project Euler #6 in Common LIsp
;;;;
;;;; 6.lisp
;;;; ProjectEuler
;;;;
;;;; Created by bitdewy on 4/10/13.
;;;; Copyright (c) 2013 bitdewy. All rights reserved.
;;;;
;; Project Euler #6
(defun square (x)
@bitdewy
bitdewy / logo-css3.css
Last active January 4, 2016 03:09
cyou logo
body {
margin: 0;
padding: 0;
font: 12px Tahoma, arial, sans-serif;
}
header {
font-family: 'Segoe UI Light', 'Segoe UI', 'Microsoft Jhenghei', '微软雅黑', sans-serif;
color: #666;
font-size: 50px;