-
Enable subpixel font rendering (0 to 3 light -> bold) https://github.com/DAddYE/dotfiles/blob/master/.osx_defaults#L178-L179
-
Add this awesome font which support bold/italic and a light version perfect for dark themes https://github.com/adobe/source-code-pro
-
If you want to use better colors in terminal avoid solarized and go through: https://github.com/chriskempson/base16 be sure to match the vim themes with the [iterm theme](https://githu
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for man in 1 3 5 7; do | |
ln -sf /usr/local/lib/node_modules/npm/man/man${man}/* /usr/local/share/man/man${man} | |
done | |
ln -sf /usr/local/lib/node_modules/npm/bin/npm-cli.js /usr/local/bin/npm | |
npm update npm -g |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### | |
# Execute tests in parallel using multiple processes. Uses DRb to communicate | |
# between processes over a unix socket. | |
gem 'minitest', '~> 5.1.0' | |
require 'minitest' | |
require 'minitest/spec' | |
require 'minitest/mock' | |
require 'drb' | |
require 'drb/unix' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'fiddle' | |
require 'fiddle/import' | |
module GVL | |
include Fiddle | |
extend Importer | |
dlload Handle::DEFAULT | |
T = import_function 'rb_thread_call_without_gvl', TYPE_VOIDP, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn messages* [& {:keys [host port topic part offset max-size] | |
:or {port 9092 part 0 offset 0 max-size 1000000} | |
:as options}] | |
(let [c (kafka/consumer host port) | |
f (kafka/fetch topic part offset max-size) | |
m (kafka/messages c f) | |
o (:offset (last m))] | |
(concat | |
(lazy-seq (messages* :host host | |
:port port |
Launch on the remote host your jar with:
java -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmemote.port=1098 -server -jar target/name-of-jar
Then open a ssh socket connection with:
ssh -ND 9696 remote.host
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(let [log-agent (agent nil)] | |
(defn log | |
[& messages] | |
(send log-agent (fn [_] (apply println messages))) | |
(await log-agent))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
For each Ruby module/class, we have Ruby methods on the left and the equivalent | |
Clojure functions and/or relevant notes are on the right. | |
For clojure functions, symbols indicate existing method definitions, in the | |
clojure namespace if none is explicitly given. clojure.contrib.*/* functions can | |
be obtained from http://github.com/kevinoneill/clojure-contrib/tree/master, | |
ruby-to-clojure.*/* functions can be obtained from the source files in this | |
gist. | |
If no method symbol is given, we use the following notation: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desc "Generates .yml files for I18n translations" | |
task :translate => :environment do | |
models = Dir["#{Padrino.root}/{app,}/models/**/*.rb"].map { |m| File.basename(m, ".rb") } | |
models.each do |m| | |
# Get the model class | |
klass = m.camelize.constantize | |
# Avoid non ActiveRecord models | |
next unless klass.ancestors.include?(ActiveRecord::Base) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/initializers/source_maps.rb | |
if Rails.env.development? | |
module CoffeeScript | |
class SourceMapError < StandardError; end; | |
class << self | |
def compile script, options | |
script = script.read if script.respond_to?(:read) |