###Some don't work yet.
Get the top request methods
varnishtop -i RxRequest
Top urls that missed the cache.
varnishtop -i TxURL
###Some don't work yet.
Get the top request methods
varnishtop -i RxRequest
Top urls that missed the cache.
varnishtop -i TxURL
NOTE: This guide has moved to https://github.com/bpierre/switch-to-vim-for-good
This guide is coming from an email I used to send to newcomers to Vim. It is not intended to be a complete guide, it is about how I switched myself.
My decision to switch to Vim has been made a long time ago. Coming from TextMate 1, I wanted to learn an editor that is Open Source (so I don’t lose my time learning a tool that can be killed), cross platform (so I can use it everywhere), and powerful enough (so I won’t regret TextMate). For these reasons, Vim has always been the editor I wanted to learn, but it took me several years before I did it in a way that works for me. I tried to switch progressively, using the Janus Vim distribution for a few months, then got back to using TextMate 2 for a time, waiting for the next attempt… here is what finally worked for me.
Original gist with comments: https://gist.github.com/bpierre/0a0025d348b6001394e0
require "./compiler/crystal/**" | |
while line = gets | |
compiler = Crystal::Compiler.new | |
program = Crystal::Program.new | |
program.target_machine = compiler.target_machine | |
prelude = program.normalize(Crystal::Require.new("prelude")) |
The goal of this is to have an easily-scannable reference for the most common syntax idioms in Ruby and Rust so that programmers most comfortable with Ruby can quickly get through the syntax differences and feel like they could read and write basic Rust programs.
What do you think? Does this meet its goal? If not, why not?
Ruby:
UI.registerHelper('_', function() { | |
arguments = _.toArray(arguments); | |
var self = this, | |
fn = arguments[0]; | |
arguments.shift(); // Removes the Underscore function | |
arguments.pop(); // Remove the Spacebars appended argument | |
return _[fn].apply(self, arguments); | |
}); | |
/* |
#https://gist.github.com/tlowrimore/5162327 | |
#http://stackoverflow.com/a/15413611/270511 | |
module ActiveRecord::UnionScope | |
def self.included(base) | |
base.send :extend, ClassMethods | |
end | |
module ClassMethods | |
def union_scope(*scopes) |
# | |
# This Python script makes a summary of a football game by cutting | |
# the video around the 10 % loudest moments, which generally | |
# include the goals and other important events. | |
# For more details, see this blog post: | |
# http://zulko.github.io/blog/2014/07/04/automatic-soccer-highlights-compilations-with-python/ | |
# | |
# LICENCE: Creative Commons 0 - Public Domain | |
# I, the author of this script, wave any rights and place this work in the public domain. | |
# |
# METEOR CORE: | |
Anywhere: Meteor.isClient | |
Anywhere: Meteor.isServer | |
Anywhere: Meteor.startup(func) | |
Anywhere: Meteor.absoluteUrl([path], [options]) | |
Anywhere: Meteor.settings | |
Anywhere: Meteor.release | |
sub vcl_recv { | |
#taken from http://www.useragentstring.com/pages/useragentstring.php | |
if (req.http.user-agent ~ "008") { | |
return (pass); | |
} | |
if (req.http.user-agent ~ "ABACHOBot") { | |
return (pass); | |
} |
using UnityEngine; | |
using System.Collections; | |
//#pragma strict | |
//#pragma implicit | |
//#pragma downcast | |
// Require a character controller to be attached to the same game object | |
// I had to initally comment out the following RequireComponent | |
// line to make it compile and allow attaching to my Main Camera; |