Skip to content

Instantly share code, notes, and snippets.

View maggit's full-sized avatar
💅
Focusing

Raquel Hernandez maggit

💅
Focusing
View GitHub Profile
@maggit
maggit / gist:775330cde7df1ebe12f7e72e539a9f40
Last active March 22, 2019 18:12
Stuff to eat & drink in Tulum

Places to eat/drink and have a good time

  1. El Camello Jr, tasty authentic mariscos for crazy low prices link

  2. El Bistro @ Ziggy Beach, amazing breakfast /brunch! link

  3. Posada Margherita, one of the best restaurants in Tulum, their pasta is incredible link

  4. Puro Corazón, great food and drinks link

@thisiskseniab
thisiskseniab / budapest_recommendations.md
Last active May 31, 2018 04:36
Recommendations for places to eat, drink and visit at in Budapest, Hungary
@peterclark
peterclark / ruby-google-api-analyticsv3.rb
Last active May 1, 2020 02:19
Authentication with the Ruby Google API Client and Google Analytics API
# Create credentials json file
# 1. Go to Google API Console
# 2. Create credentials (Service Account Key). Note 'Service account ID'
# 3. Download key as 'google_auth.json'
# 4. Go to Google Analytics -> Admin -> View Settings. Note 'View ID'
# 5. Go to User Management -> Add permissions for: (Service account ID) [Read & Analyze]
# Terminal
export GOOGLE_APPLICATION_CREDENTIALS='config/google_auth.json'
@airblade
airblade / copy_attachments.rb
Created November 10, 2015 11:01
Copies S3-stored Paperclip attachments from one AR model to another
# lib/paperclip/copy_attachments.rb
# Copies S3-stored Paperclip attachments from one AR model to another.
#
# This module should be mixed into the target AR model.
if Gem::Version.new(::AWS::VERSION) >= Gem::Version.new(2)
raise NotImplementedError, 'coded for aws-sdk v1'
end
@maggit
maggit / gist:6124411b442c0a857c2f
Last active December 20, 2019 16:26
Awesome Tacos in Mexico City
Places to eat/drink and have a good time
1. El Borrego Viudo (24 hours tacos, Revolución 241 esq. Viaducto, Tacubaya) Speciality: Tacos de cabeza
2. El Huequito (Pennsylvania 73, Col. Nápoles) Speciality: Tacos de pastor
3. El Vilsito (Petén 248 (esq. Av. Universidad)) Speciality: Costilla con queso
4. Fonda 99.99 (Calle Moras 347, Benito Juárez) Speciality: Tacos de cochinita pibil
5. El Tizoncito (Tamaulipas 122, Col. Condesa.) Speciality: Tacos de pastor
6. Los Parados (Monterrey 333, Col. Roma Sur) Speciality: Tacos de arrachera, vegetarian friendly
7. Los Cocuyos (Bolívar 56, Col. Centro) Speciality: Tacos de suadero (Go here if you feel adventurous)
8. La Tia Yeya (Citlaltepetl No. 25 entre Campeche y Amsterdam Col. Condesa) Speciality: Breakfast chilaquiles, vegetarian friendly
@vsouza
vsouza / .bashrc
Last active June 14, 2024 08:45
Golang setup in Mac OSX with HomeBrew. Set `GOPATH` and `GOROOT` variables in zshell, fish or bash.
# Set variables in .bashrc file
# don't forget to change your path correctly!
export GOPATH=$HOME/golang
export GOROOT=/usr/local/opt/go/libexec
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin
@toolmantim
toolmantim / sidetiq_schedule_time_zone_additions.rb
Last active November 30, 2016 18:59
An addition to Sidetiq to make it easier to declare the worker's schedule's timezone. Assumes ActiveRecord::TimeZone is available.
# Timezone extension to Sidetiq
Sidetiq::Schedulable::ClassMethods.class_eval do
# Sets the time zone for the recurrence rules.
#
# Example:
#
# class MyWorker
# include Sidekiq::Worker
# include Sidetiq::Schedulable
#
@stereoscott
stereoscott / copy_attachments.rb
Created April 6, 2014 21:56
Paperclip Copy Attachments
module Paperclip
module CopyAttachments
def copy_attachments_from(source_obj, source_bucket = nil, destination_bucket = nil)
self.class.attachment_definitions.keys.each do |attachment_name|
source_attachment = source_obj.send(attachment_name)
next if source_attachment.blank?
destination_attachment = self.send(attachment_name)
connection = destination_attachment.send(:connection)
@plentz
plentz / nginx.conf
Last active July 22, 2024 11:19
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@jbonney
jbonney / deploy.rb
Created August 17, 2013 15:15
Mina deployment file to setup new host for Rails applications. Creates the folder structure, fill up the database.yml file, create the associated DB and user and set up new Apache virtual host file.
require 'mina/bundler'
require 'mina/rails'
require 'mina/git'
require 'mina/rvm'
# Usually mina focuses on deploying to one host and the deploy options are therefore simple.
# In our case, there is a number of possible servers to deploy to, it is therefore necessary to
# specify the host that we are targeting.
server = ENV['server']
# Since the same host can have multiple applications running in parallel, it is necessary to