For example, pass a config option to libv8
gem
$ bundle config --local build.libv8 --with-system-v8
$ cat .bundle/config
---
BUNDLE_BUILD__LIBV8: "--with-system-v8"
Now libv8
will be installed almost in the same way that gem
does:
(defun pocket-reader-org-roam-capture () | |
(interactive) | |
(pocket-reader--at-marked-or-current-items | |
(when-let ( | |
(resolved_title (pocket-reader--get-property 'resolved_title)) | |
(resolved_url (pocket-reader--get-property 'resolved_url)) | |
(item_id (pocket-reader--get-property 'item_id)) | |
(time_added (pocket-reader--get-property 'time_added)) | |
(excerpt (pocket-reader--get-property 'excerpt)) | |
(tags (combine-and-quote-strings (pocket-reader--get-property 'tags))) |
;;;;;;;;;;;;;;;;;;; | |
;; Collections in Clojure | |
;;;;;;;;;;;;;;;;;;; | |
;; Distinctive characteristics | |
;;;;;;;;;;;;;;;;;;; | |
;; * They are mainly used in terms of abstractions, not the details of concrete implementations. | |
;; * They are immutable and persistent. | |
;;;;;;;;;;;;;;;;;;; |
For example, pass a config option to libv8
gem
$ bundle config --local build.libv8 --with-system-v8
$ cat .bundle/config
---
BUNDLE_BUILD__LIBV8: "--with-system-v8"
Now libv8
will be installed almost in the same way that gem
does:
# config/routes.rb | |
resources :documents do | |
scope module: 'documents' do | |
resources :versions do | |
post :restore, on: :member | |
end | |
resource :lock | |
end | |
end |
#!/usr/bin/env ruby | |
# | |
# Git commit-msg hook. If your branch name is in the form "username/vod-45-new-feature" | |
# it automatically adds the prefix "[VOD-45]" to commit | |
# messages. | |
# | |
# Example | |
# ======= | |
# | |
# git checkout -b bob/vod-45-some-cool-feature |
# I'm using --create-options to get all the info about table creation (i.e. engine=InnoDB) | |
$ mysqldump -u foobar -p --single-transaction --create-options <database> > file.sql | |
%w(rubygems sequel fileutils yaml active_support/inflector).each{|g| require g} | |
require File.join(File.dirname(__FILE__), "downmark_it") | |
module WordPress | |
def self.import(database, user, password, table_prefix = "wp", host = 'localhost') | |
db = Sequel.mysql(database, :user => user, :password => password, :host => host, :encoding => 'utf8') | |
%w(_posts _drafts images/posts/featured).each{|folder| FileUtils.mkdir_p folder} |
#!/usr/bin/env ruby | |
# encoding: UTF-8 | |
# | |
# LearnRubyByExample: | |
# | |
# Ruby is a highly expressive programming language. | |
# Testing software is an expressive way to communicate how it works. | |
# | |
# In the middle of a night awake for allergy and insomnia, and some days after the 1st _why day, | |
# I've tried to combine Ruby and testing to help teaching ruby with some goals in mind: |
def wadus(wadus = nil, options = {}) | |
puts "wadus = #{wadus.inspect}" | |
puts "options = #{options.inspect}" | |
end | |
wadus | |
# wadus = nil | |
# options = {} | |
# OK |