Skip to content

Instantly share code, notes, and snippets.

View zamith's full-sized avatar

Luís Ferreira zamith

View GitHub Profile
~/Projects/my-dotfiles/vim/ftplugin/markdown.vim
110: /usr/local/Cellar/vim/7.4.253/share/vim/vim74/ftplugin/markdown.vim
111: ~/Projects/my-dotfiles/vim/bundle/vim-snipmate/ftplugin/html_snip_helper.vim
112: /usr/local/Cellar/vim/7.4.253/share/vim/vim74/ftplugin/html.vim
113: ~/Projects/my-dotfiles/vim/bundle/syntastic/autoload/syntastic/log.vim
114: ~/Projects/my-dotfiles/vim/bundle/ctrlp.vim/autoload/ctrlp/utils.vim
115: ~/Projects/my-dotfiles/vim/ftplugin/html.vim
@zamith
zamith / gist:08407aa767e890ee7a2d
Created November 26, 2014 16:08
rails-dev-box output
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Importing base box 'ubuntu/trusty32'...
==> default: Matching MAC address for NAT networking...
==> default: Checking if box 'ubuntu/trusty32' is up to date...
==> default: Setting the name of the VM: rails-dev-box_default_1417017607283_37929
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
default: Adapter 1: nat
==> default: Forwarding ports...
@zamith
zamith / console
Last active August 29, 2015 14:13 — forked from anonymous/websocket.cr
var connection = new WebSocket('ws://127.0.0.1:3000')
connection.send("Hello World from WS")
require "frank"
require "ecr"
require "ecr/macros"
get "/" do |context|
context.response.content_type = "text/html"
ECR.process_file("views/index.ecr")
end
defmodule TheShelf.Mixfile do
use Mix.Project
def project do
[ app: :the_shelf,
version: "0.0.1",
elixir: "~> 1.0.0-rc1",
elixirc_paths: ["lib", "web", "test"],
deps: deps(Mix.env) ]
end
$ crystal spec/compiler/lexer/lexer_string_array_spec.cr
Using compiled compiler at .build/crystal
Undefined symbols for architecture x86_64:
"_LLVMInitializeX86AsmPrinter", referenced from:
_*LLVM::init_x86:(Void | Nil) in LLVM.o
"_LLVMInitializeX86Target", referenced from:
_*LLVM::init_x86:(Void | Nil) in LLVM.o
"_LLVMInitializeX86TargetInfo", referenced from:
_*LLVM::init_x86:(Void | Nil) in LLVM.o
"_LLVMInitializeX86TargetMC", referenced from:
@zamith
zamith / mocks.cr
Last active August 29, 2015 14:14
require "spec"
class Double
def initialize(@name, @stubs = {} of Symbol => Object)
end
def receives_and_returns(method_name = :none, return_value = true)
stubs[method_name] = return_value
end
(node.v.element.children.data[0].value as LibGumbo::GumboNode).value.type
# Lib
struct GumboNode
type: GumboNodeType
parent: GumboNode*
index_with_parent: LibC::SizeT
parse_flags: GumboParseFlags
v: Node
def index
@plans = Plan.all
@graph = Graph.new(@plans)
end
def install
unless Dir.exists?(target_dir)
repo_url = if @use_ssh
"git@github.com:#{@author}/#{@repository}.git"
else
"git://github.com/#{@author}/#{@repository}.git"
end
exec "git clone#{@branch} #{repo_url} #{target_dir}"
end