This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
| -# For each locale except the current one | |
| - (I18n.available_locales - [I18n.locale]).each do |locale| | |
| -# Add a link to the current URL but in `locale` language | |
| %link{rel: 'alternate', hreflang: locale, href: url_for(locale: locale)} |
uninstall JetBrains settings:curl -sL https://gist.github.com/denji/9731967/raw/jetbrains-uninstall.sh | bash -s
backup JetBrains settings:curl -sL https://gist.github.com/denji/9731967/raw/jetbrains-backup.sh | bash -s
| def convert_base64_image(data, type) | |
| io = FileIo.new(Base64.decode64(data)) | |
| io.class.class_eval { attr_accessor :original_filename, :content_type } | |
| io.original_filename = "photo.jpeg" | |
| io.content_type = type | |
| self.profile_photo = io | |
| end |
| #POST /v1/users/{id}/profile_photo | |
| def create | |
| user = User.where(_id: params[:id]).first | |
| app_decorator = ApplicationDecorator.new(User) | |
| if !user.nil? | |
| user_decorated = UserDecorator.decorate(user) | |
| # RailsAdmin config file. Generated on April 04, 2013 19:54 | |
| # See github.com/sferik/rails_admin for more informations | |
| RailsAdmin.config do |config| | |
| ################ Global configuration ################ | |
| # Set the admin name here (optional second array element will appear in red). For example: | |
| config.main_app_name = ['Issue1591', 'Admin'] |
| <!doctype html> | |
| <html> | |
| <head> | |
| <meta charset="utf-8"> | |
| <title>App Redirection</title> | |
| </head> | |
| <body> | |
| <!-- | |
| NOTE: This was a great hack in days gone by, but now both Apple and Google have improved their support for custom | |
| protocol handlers. |
# http://wiki.apache.org/solr/FAQ#How_can_I_delete_all_documents_from_my_index.3F
# http://wiki.apache.org/solr/UpdateXmlMessages#Updating_a_Data_Record_via_curl
curl "http://index.websolr.com/solr/a0b1c2d3/update?commit=true" -H "Content-Type: text/xml" --data-binary '<delete><query>*:*</query></delete>'I'm amused at the traction this little gist is getting on Google! I would be remiss not to point out that six+ years later I'm still helping thousands of companies on a daily basis with their search index management, by providing managed Solr as a service over at Websolr, and hosted Elasticsearch at Bonsai. Check us out if you'd like an expert helping hand at Solr and Elasticsearch hosting, ops and support!