Skip to content

Instantly share code, notes, and snippets.

View xguox's full-sized avatar

XguoX xguox

View GitHub Profile
@otobrglez
otobrglez / dropbox.rake
Created August 25, 2011 10:01
Rake task for moving Heroku PostgreSQL backups to Dropbox (Rails)
# By Oto Brglez - @otobrglez
# Rake task. Put in your (lib/tasks) folder of your Rails application
# Execute with "rake dropbox:backup"
# Configuration must be inside config/dropbox.yml file
namespace :dropbox do
desc "Backup production database to dropbox"
task :backup do
@jocubeit
jocubeit / gist:1713910
Created January 31, 2012 23:45
Install Nokogiri on Mac OSX Lion including libiconv using Homebrew
# Install libxml2 using Homebrew
# If you don't have Homebrew, follow the instructions at:
# https://github.com/mxcl/homebrew/wiki/Installation
# -------------------------------------------------------
brew install libxml2
# Install libxslt from source code
# If you don't have wget, follow the instructions at:
# http://www.mactricksandtips.com/2008/07/installing-wget-on-your-mac-for-terminal.html
# Or use Homebrew:
@dhrrgn
dhrrgn / gist:10125477
Last active February 26, 2021 18:42
Upgrade Ubuntu OpenSSL to patch Heartbleed
sudo apt-get update
sudo apt-get install -y libssl1.0.0 openssl
# Confirm Build Date is at least Aril 7th 2014
openssl version -a
# Restart all services listed by this command:
sudo lsof -n | grep ssl | grep DEL
@simonmorley
simonmorley / gist:5901be947407ea427f0a
Last active January 19, 2017 21:36
Import and Alias Mulitple Indexes To Elasticsearch Rails
# A collection of Rake tasks to facilitate importing data from yout models into Elasticsearch.
# This will import the index as an alias, update the alias and delete the old ones
# It will also allow the importation of indexes via arguments
# Add this e.g. into the `lib/tasks/elasticsearch.rake` file in your Rails application:
#
# require 'elasticsearch/rails/tasks/import'
#
# To import the records from your `Article` model, run:
@eddiewebb
eddiewebb / readme.md
Last active June 24, 2024 02:21
Hugo JS Searching with Fuse.js