Skip to content

Instantly share code, notes, and snippets.

set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()
" alternatively, pass a path where Vundle should install plugins
"call vundle#begin('~/some/path/here')
" let Vundle manage Vundle, required
@zettoone
zettoone / ZenburnPowerShell.psm1
Last active November 2, 2019 22:00
Powershell Console Color Configuration
# ZenburnPowerShell.psm1 by Adam Boddington
# http://stackingcode.com/blog/2011/11/14/zenburn-powershell
# Zenburn by Jani Nurminen
# http://slinky.imukuppi.org/zenburnpage
# Place this file into a module locations, you can check by
# $env:psmodulepath
# Run:
# Set-ExecutionPolicy RemoteSigned -Scope process
@zettoone
zettoone / helloglfw.cpp
Last active December 31, 2015 19:09
GLFW snippets
#include <GLFW/glfw3.h>
#include <cstdlib>
#include <cstdio>
#include <memory>
#include <functional>
namespace
{
GLfloat spin = 0.f;
#pragma once
//---------------------------------------------------------------------------------------------
// FIXMEs / TODOs / NOTE macros
//---------------------------------------------------------------------------------------------
#define _QUOTE(x) # x
#define QUOTE(x) _QUOTE(x)
#define __FILE__LINE__ __FILE__ "(" QUOTE(__LINE__) ") : "
#define NOTE( x ) message( x )
@zettoone
zettoone / gist:6102733
Created July 29, 2013 07:51
Running Jekyll on Windows
# Install the Ruby from http://rubyinstaller.org/downloads/ and install it to path such as C:\ruby
# Install the Ruby development kit from here and extract it to path such as c:\devkit. Run the following commands to generate the config.yml file
ruby dk.rb init
# Edit the generated config.yml file to include installed Rubies. For example, in our case, it will look like this
# This configuration file contains the absolute path locations of all
# installed Rubies to be enhanced to work with the DevKit. This config
#define 喵喵喵 main
#define 喵喵 int
#define 喵 (
#define 喵喵呜 )
#define 喵喵喵喵 {
#define 喵呜喵 }
#define 喵呜喵呜喵 printf
#define 呜 "\n"
#define 喵呜喵呜 return
#define 呜喵 0
' Open the Macro Explorer (Tools/Macros/Macro Explorer), create a new Module, and add the following subroutine:
Sub RunPremake()
If Not DTE.Solution Is Nothing And Not String.IsNullOrEmpty(DTE.Solution.FullName) Then
Dim solutionPath, solutionDir, premakeTarget, premakeFlags, premakeExePath, premakeScriptDir As String
solutionPath = DTE.Solution.FullName
solutionDir = solutionPath.Substring(0, solutionPath.LastIndexOf("\"))
premakeTarget = solutionDir.Substring(solutionDir.LastIndexOf("\") + 1)
' You might need to adjust these
premakeFlags = ""
@zettoone
zettoone / nth_prime.py
Last active December 16, 2015 23:29
通往地狱的阶梯(
def sundaram(n):
"""
sundaram(n) -> [int]
Return a list of prime numbers which are less than n.
This is a commented version of implementation
from http://stackoverflow.com/a/2073279/439033,
which is based on Sundaram's Sieve
(http://plus.maths.org/content/os/issue50/features/havil/index)
"""
@zettoone
zettoone / phrases.txt
Last active December 13, 2015 23:39
ibus自用短语, 丢去~/.config/ibus/pinyin/phrases.txt
fu=╭∩╮(︶︿︶)╭∩╮
songjian=╮( ̄﹏ ̄)╭
naive=Θ..Θ
xianzhuo=(ノ=Д=)ノ┻━┻
xianzhuo=(╯#-_-)╯~~╧═╧
xianzhuo=(/థฺ౪థ)/~~╧═╧
aojiao=(/>///<)/~~╧═╧
@zettoone
zettoone / DX11.lua
Last active December 13, 2015 22:19
premake4 script collections
-- premake4 script for DirectX11 project with proper library linkages
local action = _ACTION or ""
-------------------------------------------------------------------
-- Maintain VS project guid between regenerations
-------------------------------------------------------------------
local fileext = "vcproj"
local pattern = "ProjectGUID=\"{(.+)}\""