Skip to content

Instantly share code, notes, and snippets.

View juanjoseijas's full-sized avatar
💭
I may be slow to respond.

Juanjo Seijas juanjoseijas

💭
I may be slow to respond.
View GitHub Profile
@Mattieuga
Mattieuga / parse+sendgrid.js
Last active December 13, 2015 22:18
Sample of using Parse with the SendGrid Cloud Module. This example will send an email when other users comment on a picture in Anypic (https://parse.com/anypic).
// Require the SendGrid Cloud Module
var sendgrid = require("sendgrid");
sendgrid.initialize("[email protected]", "your_password");
// Run this Cloud Function every time a new Activity (such as a comment)
// is saved
Parse.Cloud.afterSave("Activity", function(request, response) {
// Check if the activity type is a comment
var activity = request.object;
if (activity.get("type") === "comment") {
@kogakure
kogakure / gist:4769904
Created February 12, 2013 13:31
SASS: Circle Mixin
@mixin circle($width, $color) {
width: $width;
height: $width;
background: $color;
-webkit-border-radius: $width/2;
-moz-border-radius: $width/2;
border-radius: $width/2;
}
.circle {
@gutenye
gutenye / ember-with-middleman.md
Last active December 10, 2015 01:58
Write Ember.js App With Middleman

I. Create a Middleman project with middleman-ember-template

$ middleman init hello --template=ember

II. Install ember.js package

$ bower install ember
@ttscoff
ttscoff / speedmail.applescript
Last active March 23, 2025 03:08
Speed up Mail.app
(*
Speed up Mail.app by vacuuming the Envelope Index
Code from: http://www.hawkwings.net/2007/03/03/scripts-to-automate-the-mailapp-envelope-speed-trick/
Originally by "pmbuko" with modifications by Romulo
Updated by Brett Terpstra 2012
Updated by Mathias Törnblom 2015 to support V3 in El Capitan and still keep backwards compability
Updated by @lbutlr for V5 and Container folder in High Sierra and use du
*)
tell application "Mail" to quit
@janrubio
janrubio / setting_up_active_admin_on_heroku.md
Last active November 7, 2017 20:22 — forked from wrburgess/setting_up_active_admin_on_heroku.md
Rails App with ActiveAdmin on Heroku #rails #ruby #activeadmin #heroku
@kuboon
kuboon / application_helper.rb
Created July 26, 2012 08:15
glyph icon helper for twitter-bootstrap with Rails
module ApplicationHelper
# ==== Examples
# glyph(:share_alt)
# # => <i class="icon-share-alt"></i>
# glyph(:lock, :white)
# # => <i class="icon-lock icon-white"></i>
def glyph(*names)
content_tag :i, nil, class: names.map{|name| "icon-#{name.to_s.gsub('_','-')}" }
end
@iamdustan
iamdustan / yepnope.js
Created June 5, 2012 15:01
Categorizr.js and yepnope.js are best friends.
yepnope([
{
test : categorizr.isMobile,
, yep : ['mobile-specific.js', 'mobile-specific.css']
}
, {
test : categorizr.isTablet,
, yep : ['tablet-specific.js', 'tablet-specifc.css']
}
, {
@vitaLee
vitaLee / compact_expand_css_command.py
Created June 3, 2012 13:26
SublimeText command for compacting/expanding CSS rules
import sublime
import sublime_plugin
import re
class CompactExpandCssCommand(sublime_plugin.TextCommand):
def run(self, edit, action='compact'):
rule_starts = self.view.find_all('\{')
rule_ends = self.view.find_all('\}')
@nandub
nandub / play bundle install fail
Created March 31, 2012 02:58
rb-fsevent 0.4.3.1 fail to compile
$ bundle install
Fetching gem metadata from http://rubygems.org/.......
Fetching gem metadata from http://rubygems.org/..
Using rake (0.9.2.2)
Using SystemTimer (1.2.3)
Using multi_json (1.0.3)
Using activesupport (3.1.1)
Using builder (3.0.0)
Using i18n (0.6.0)
Using activemodel (3.1.1)
@joeyblake
joeyblake / hostfix
Created February 27, 2012 16:13
Shell script for cleaning/resetting /etc/hosts files messed up by MAMP Pro
#!/bin/bash
# copy this file to /usr/sbin
# if you have other hosts entries that you would not like to lose, make sure they get added to the hosts.mamp.bak file
cat /etc/hosts.mamp.bak > /etc/hosts
echo 'clean!'