These are the few steps I ran to completely remove RVM and install rbenv:
To remove pretty much everything:
$ rvm implode
/* | |
* Wrap up the Backbone application in a simple interface | |
*/ | |
// Using Jquery... | |
(function ($) { | |
// Create application | |
var MyApp = (function () { |
# Link dotfiles | |
dropboxPath = File.expand_path(File.dirname(__FILE__)) | |
targetPath = File.expand_path('~') | |
files = 0 | |
Dir.foreach(dropboxPath) do |file| | |
if (file != '.') && (file != '..') && (file != File.basename(__FILE__)) | |
%x[ln -sF #{dropboxPath}/#{file} #{targetPath}/#{file}] | |
files += 1 | |
end |
# | |
# If, for example, you've accidentally made some commits to master | |
# that should be on a feature branch, this set of commands will | |
# move those commits over to a feature branch and reset master to | |
# where it should be both locally and on the remote. | |
# | |
# References: | |
# | |
# - http://stackoverflow.com/questions/1628563/move-recent-commit-to-a-new-branch | |
# - http://stackoverflow.com/questions/1377845/git-reset-hard-and-a-remote-repository |
#!/bin/sh | |
# | |
# This script deletes a feature branch you've been | |
# working on, assuming that it's been merged as part | |
# of a Pull Request, and pulls it into your master | |
# branch. | |
# | |
# You need a typical setup, and a reference to the | |
# forked repo, called `upstream`. |
/* | |
* Use the small setup below to make the | |
* jQuery Autocomplete widget show on input-blur, | |
* rather than on every keypress. | |
*/ | |
(function ($) { | |
var field = $('.selector'); | |
field.autocomplete({ |
<ul class="ui-tabs"> | |
<li> | |
<a href="#tab-1">My Tab 1</a> | |
</li> | |
<li> | |
<a href="#tab-2">My Tab 2</a> | |
</li> | |
<li> | |
<a data-external="http://www.example.com">My External Tab</a> | |
</li> |
# Adapted from http://stackoverflow.com/questions/1733507/how-to-get-size-of-mysql-database | |
SELECT Round(Sum(data_length + index_length) / 1024 / 1024, 1) "DB Size in MB" | |
FROM information_schema.tables | |
WHERE table_schema = "database_name" # Replace this with the name of the database you want to inspect | |
GROUP BY table_schema; |
var express = require('express') | |
, app = express() | |
, server = require('http').createServer(app) | |
, io = require('socket.io').listen(server) | |
, five = require('johnny-five') | |
, board = new five.Board({ port:'/dev/tty.usbmodemfa131'} ) | |
, led; | |
// Listen for lights change | |
io.sockets.on('connection', function (socket) { |
var MyView = Backbone.View.extend({ | |
events: function () { | |
var mobile = false | |
if (mobile) { | |
return { | |
"touch": function () { console.log('touched') } | |
} | |
} else { |