This is a gist used in the following blog posts:
def stats | |
# TODO | |
end | |
def dogtags | |
# TODO | |
end | |
ActiveSupport::Notifications.subscribe("enqueue.active_job") do |*args| | |
event = ActiveSupport::Notifications::Event.new(*args) |
# How to uninstall Razer Synapse 2 ( https://www.razerzone.com/synapse-2 ) | |
# on OS X (10.11-10.13) (El Capitan, Sierra, High Sierra) | |
# without using Razer's official uninstall tool. | |
# Tested on OS X 10.11.5 in July 2016. | |
# Edited with additional steps for later OS X versions, | |
# contributed by commenters on this gist. | |
# Step 1: In your terminal: stop and remove launch agents | |
launchctl remove com.razer.rzupdater |
The Google Drive API supports these MIME types, but if you try to filter using them, you may find you're not getting the document types back that you expect. Especially when using setMimeTypes()
with Google's JavaScript Picker.
Here are the poorly documented or completely undocumented MIME types I discovered:
If you want application/vnd.google-apps.document
, also use application/vnd.google-apps.kix
. Source.
If you want application/vnd.google-apps.spreadsheet
, also use application/vnd.google-apps.ritz
. Via a private email from a Google employee.
If you want application/vnd.google-apps.presentation
, also use application/vnd.google-apps.punch
. Source.
# Tweaked from http://tomislavsantek.iz.hr/2011/03/moving-mysql-databases-to-ramdisk-in-ubuntu-linux | |
# Log in as root | |
# Mount ramdisk folder in RAM | |
mkdir /tmp/ramdisk | |
mount -t tmpfs -o size=128M tmpfs /tmp/ramdisk/ | |
# Move MySQL data | |
mv /var/lib/mysql /tmp/ramdisk/mysql | |
ln -s /tmp/ramdisk/mysql/ /var/lib/mysql |
In the project I'm working on we wanted to have a Category model which we wanted to be nestable. But we also liked the user to have a draggable interface to manage and rearrange the order of his categories. So we chose awesome_nested_set for the model and jQuery.nestedSortable for the UI.
It took me some time to arrange things to work properly so I wanted to share my work in case it helps anybody.
you might want to take a look at a demo app
- go to: http://awesomenestedsortable.heroku.com/groups/
- click in show of any group
require 'action_view' | |
module ActionView | |
module Template::Handlers | |
class NokogiriBuilder | |
class_attribute :default_format | |
self.default_format = Mime::XML | |
def call(template) | |
require 'nokogiri' |