Skip to content

Instantly share code, notes, and snippets.

View cefigueiredo's full-sized avatar

Carlos Figueiredo cefigueiredo

  • Montreal, Quebec
View GitHub Profile
@bfoz
bfoz / fixup_committer_date.sh
Created September 7, 2010 19:24
Force GIT_COMMITTER_DATE = GIT_AUTHOR_DATE
git filter-branch --env-filter 'export GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"'
@prellele
prellele / gist:1825744
Created February 14, 2012 10:48
Using StartSSL Certs with Nginx-Webserver

NOTE: You can check, if your config here:
http://www.sslshopper.com/ssl-checker.html

Decrypt the private key using the password you entered when you created your key:
openssl rsa -in ssl.key -out /etc/nginx/conf/ssl.key

Protect your key from prying eyes:
chmod 600 /etc/nginx/conf/ssl.key

@assimovt
assimovt / README.md
Last active June 8, 2018 22:12
Adds Newrelic RPMs metrics to your dashboard.

Setup

Add the following gems to your Gemfile:

gem 'activeresource'
gem 'newrelic_api'

Update your bundle:

@rxaviers
rxaviers / gist:7360908
Last active July 20, 2026 04:00
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@dgeb
dgeb / orbit-ember-data-adapter.js
Last active January 3, 2016 10:08
A very simple example Orbit adapter implementation for Ember Data that's hard coded with a single Orbit.LocalStorageSource. Note that the Orbit schema could easily be auto-generated from DS models. Also, DS relationships would have to be mapped to Orbit links (and the adapter would need to call `link` / `unlink` methods on Orbit stores).
export default DS.Adapter.extend({
orbitSource: undefined,
init: function() {
this._super();
Orbit.Promise = Ember.RSVP.Promise;
// TODO - autogenerate schema from DS models
var schema = {
idField: 'id',
@namuol
namuol / INSTALL.md
Last active May 7, 2026 07:47
rage-quit support for bash

rage-quit support for bash

HOW TO INSTALL

Put flip somewhere in your $PATH and chmod a+x it.

Copy fuck into ~/.bashrc.

@lukemelia
lukemelia / gist:ec6d03802c6a80ac1c99
Created November 25, 2014 14:37
component helper
import Ember from 'ember';
Ember.Handlebars.registerHelper('component', function (name, options) {
var context = (options.contexts && options.contexts.length) ? options.contexts[0] : this;
if (options.types[0] === "ID") {
name = Ember.Handlebars.get(context, name, options);
}
var container = options.data.view.container;
var fullName = 'component:' + name;
var templateFullName = 'template:components/' + name;
@ksin
ksin / copy_attachments.rb
Last active February 13, 2017 19:59
Paperclip copy attachments s3
### s3 implementation of Paperclip module that supports deep
### cloning of objects by copying image attachments.
### Refer to Paperclip issue: https://github.com/thoughtbot/paperclip/issues/1361#issuecomment-39684643
### Original gist works with fog: https://gist.github.com/stereoscott/10011887
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)
@ChuckJHardy
ChuckJHardy / example_activejob.rb
Last active March 12, 2025 21:24
Example ActiveJob with RSpec Tests
class MyJob < ActiveJob::Base
queue_as :urgent
rescue_from(NoResultsError) do
retry_job wait: 5.minutes, queue: :default
end
def perform(*args)
MyService.call(*args)
end
@juanplopes
juanplopes / rainbow.py
Last active August 29, 2015 14:23
Python script to put a rainbow overlay in an image
#!/usr/bin/env python
import Image, colorsys, sys
if len(sys.argv) < 2:
print 'usage: {} <file> [<output>]'.format(sys.argv[0])
sys.exit(0)
img = Image.open(sys.argv[1])
width, height = img.size