[octopress (source)]$ curl -L https://get.rvm.io | bash -s stable --ruby % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 184 100 184 0 0 149 0 0:00:01 0:00:01 --:--:-- 149 100 22865 100 22865 0 0 6744 0 0:00:03 0:00:03 --:--:-- 11977 Downloading https://github.com/rvm/rvm/archive/1.27.0.tar.gz Downloading https://github.com/rvm/rvm/releases/download/1.27.0/1.27.0.tar.gz.asc gpg: Signature made Tue 29 Mar 2016 07:19:47 PM IST using RSA key ID BF04FF17 gpg: Can't check signature: No public key Warning, RVM 1.26.0 introduces signed releases and automated check of signatures when GPG software found.
desc "Default deploy task" | |
task :deploy do | |
# Check if preview posts exist, which should not be published | |
if File.exists?(".preview-mode") | |
puts "## Found posts in preview mode, regenerating files ..." | |
File.delete(".preview-mode") | |
Rake::Task[:generate].execute | |
end | |
Rake::Task[:copydot].invoke(source_dir, public_dir) |
# Twitter config (for tweeting posts) | |
client = Twitter::REST::Client.new do |config| | |
config.consumer_key = "YOUR_CONSUMER_KEY" | |
config.consumer_secret = "YOUR_CONSUMER_SECRET" | |
config.access_token = "YOUR_ACCESS_TOKEN"" | |
config.access_token_secret = "YOUR_ACCESS_TOKEN_SECRET | |
end | |
# MAKE SURE THERE IS A TRAILING SLASH, otherwise the linking won't work | |
blog_url = "YOUR_BLOG_URL/" |
# usage rake new_post[my-new-post] or rake new_post['my new post'] or rake new_post (defaults to "new-post") | |
desc "Begin a new post in #{source_dir}/#{posts_dir}" | |
task :new_post, :title, :tweet do |t, args| | |
raise "### You haven't set anything up yet. First run `rake install` to set up an Octopress theme." unless File.directory?(source_dir) | |
mkdir_p "#{source_dir}/#{posts_dir}" | |
args.with_defaults(:title => 'new-post', :tweet => '') | |
title = args.title | |
filename = "#{source_dir}/#{posts_dir}/#{Time.now.strftime('%Y-%m-%d')}-#{title.to_url}.#{new_post_ext}" | |
if File.exist?(filename) | |
abort("rake aborted!") if ask("#{filename} already exists. Do you want to overwrite?", ['y', 'n']) == 'n' |
```lisp | |
;; emacs initialization | |
(setq ring-bell-function (lambda())) | |
(setq inhibit-splash-screen t | |
initial-major-mode 'fundamental-mode) ;; removes the emacs splash screen and loads scratch buffer | |
;; initial-buffer-choice "h:/README.org");; removes the emacs splash screen and loads scratch buffer | |
``` |
- How to abort a git merge? #git
git reset --hard HEAD
- How to mail your agenda files? #emacs #org #cli
add to .gnus
(defun org-mail ()
"Send mail of agenda to myself."
ubunutmotd.txt - How ubuntu manages dynamic motd.
http://gregorygrubbs.com/emacs/10-tips-emacs-windows/ - How to make use of windows emacs and cygwin tools.
SSL Certificate location on Linux
For system wide use OpenSSL should provide you /etc/ssl/certs
and /etc/ssl/private
.
The latter of which will be restricted 700
to root:root
.
If you have an application not performing an initial privsep from root then it might suit you to locate them somewhere local to the application with the relevantly restricted ownership and permissions.
$ cd /usr/ssl/certs
I've been asked a few times over the last few months to put together a full write-up of the Git workflow we use at RichRelevance (and at Precog before), since I have referenced it in passing quite a few times in tweets and in person. The workflow is appreciably different from GitFlow and its derivatives, and thus it brings with it a different set of tradeoffs and optimizations. To that end, it would probably be helpful to go over exactly what workflow benefits I find to be beneficial or even necessary.
- Two developers working on independent features must never be blocked by each other
- No code freeze! Ever! For any reason!
- A developer must be able to base derivative work on another developer's work, without waiting for any third party
- Two developers working on inter-dependent features (or even the same feature) must be able to do so without interference from (or interfering with) any other parties
- Developers must be able to work on multiple features simultaneously, or at lea
up vote 157 down vote
When you are stuck with your vagrant machine the way described above there is no need to boot in gui mode (and is impossible without an X server).
While your VM is booting, in a separate terminal window, just find out the id of the running machine.
vboxmanage list runningvms