Skip to content

Instantly share code, notes, and snippets.

View wolflee's full-sized avatar
🎯
Focusing

WolfLee wolflee

🎯
Focusing
View GitHub Profile
@wolflee
wolflee / playground.rs
Created April 11, 2019 06:43 — forked from rust-play/playground.rs
Code shared from the Rust Playground
#![allow(unused_variables)]
#![allow(dead_code)]
use std::fmt::{Display, Formatter, Result};
struct ImportantExcerpt<'a> {
part: &'a str,
}
impl<'b> std::fmt::Display for ImportantExcerpt<'b> {
@wolflee
wolflee / spacemacs-cheatsheet.md
Last active May 10, 2019 00:34 — forked from robphoenix/spacemacs-cheshe.md
Spacemacs Cheat Sheet

Useful Spacemacs commands

  • SPC q q - quit
  • SPC w / - split window vertically
  • SPC w - - split window horizontally
  • SPC 1 - switch to window 1
  • SPC 2 - switch to window 2
  • SPC w c - delete current window
  • SPC TAB - switch to previous buffer
  • SPC b b - switch buffers
@wolflee
wolflee / Emacs_starter.pl
Created April 19, 2016 15:02 — forked from railwaycat/Emacs_starter.pl
Start Emacs.app from CLI
#!/usr/bin/perl
# Emacs starter for Emacs mac port
# Thanks to Aquamacs Project and David Reitter
my $args = "";
my $tmpfiles = "";
for my $f (@ARGV) {
gulp = require('gulp')
browserSync = require('browser-sync')
gulp.task 'browser-sync', ['webpack:dev-server'], ->
browserSync(
proxy: "localhost:8081"
port: 8080
)
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
class App
constructor: (@body) ->
# site global setup
start: ->
controllerName = @body.data('js_controller')
Controller = App[controllerName]
if Controller
@main = new Controller
@wolflee
wolflee / Gemfile
Created October 30, 2012 09:18 — forked from HungYuHei/Gemfile
followable with redis Sorted-Set
# Gemfile
gem 'redis', '~> 3.0.1'
@wolflee
wolflee / Rakefile
Created September 3, 2012 07:03 — forked from jamesaoverton/Rakefile
Preprocess Slim layout templates for Jekyll.
require 'rubygems'
require 'slim'
Slim::Engine.set_default_options :pretty => true
desc "Parse .slim layouts, ignoring any YAML front matter."
task :parse_slim do
print "Parsing Slim layouts..."
Find.find('_layouts/slim/') do |filename|
if filename.match(/\.slim\Z/)
@wolflee
wolflee / jekyll-gist-tag.rb
Created August 30, 2012 01:31 — forked from Crhistoph/jekyll-gist-tag.rb
Edelabar's Gist tag for Jekyll
require 'net/https'
module Jekyll
class RenderGist< Liquid::Tag
def initialize(tag_name, url, tokens)
super
tokens = url.split(' ')
@url = tokens[0]
@wolflee
wolflee / haml_converter.rb
Created August 20, 2012 01:43 — forked from radamant/haml_converter.rb
Simple haml-sass conversion for jekyll
module Jekyll
require 'haml'
class HamlConverter < Converter
safe true
priority :low
def matches(ext)
ext =~ /haml/i
end