Skip to content

Instantly share code, notes, and snippets.

@wrburgess
wrburgess / gist:1337891
Created November 3, 2011 21:49
Rails Contact Form w/ Gmail SMTP
# Majority of this solution was written and posted here:
# http://matharvard.ca/posts/2011/aug/22/contact-form-in-rails-3
# http://railscasts.com/episodes/206-action-mailer-in-rails-3
# config/initializers/smtp_settings.rb
ActionMailer::Base.smtp_settings = {
:address => "smtp.gmail.com",
:port => 587,
@abhinav-upadhyay
abhinav-upadhyay / DateTimeDecoder.py
Last active September 10, 2024 19:58
A JSON decoder/encoder implementation for parsing dates as datetime objects in Python
#!/usr/bin/env python
# An example of decoding/encoding datetime values in JSON data in Python.
# Code adapted from: http://broadcast.oreilly.com/2009/05/pymotw-json.html
# Copyright (c) 2023, Abhinav Upadhyay
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
@yury
yury / application.css.scss
Last active December 17, 2015 19:39
Example of tiny, smalll and large column and shortcuts for bootstrap 3.0.x grid
// Grid shortcuts
// use with https://github.com/anjlab/bootstrap-rails
//
// Columns for phones
// - columns: .x[1-12]
// For small devices (tablets and small desktops)
// - columns: .s[1-12]
// - offsets: .so[0-11]
// - pushes: .sr[0-11]
// - pulls: .sl[0-11]
@lambdalisue
lambdalisue / install_gvim.sh
Last active February 26, 2021 10:27
An install script of GVim (+python/+python3) in Ubuntu/Debian
#!/bin/bash
#==============================================================================
# An install script of GVim in Ubuntu/Debian
#==============================================================================
echo "Installing required packages ..."
sudo apt-get install -yq build-essential curl
sudo apt-get install -yq \
libncurses5-dev \
libbonoboui2-dev \