Skip to content

Instantly share code, notes, and snippets.

View Nosfheratu's full-sized avatar
🏠
Working from home

Fernando Serapio Nosfheratu

🏠
Working from home
View GitHub Profile
@Nosfheratu
Nosfheratu / mysql.txt
Last active August 29, 2015 14:11 — forked from johnantoni/mysql.txt
username: vagrant
password: vagrant
sudo apt-get update
sudo apt-get install build-essential zlib1g-dev git-core sqlite3 libsqlite3-dev
sudo aptitude install mysql-server mysql-client
sudo nano /etc/mysql/my.cnf
@Nosfheratu
Nosfheratu / development.rb
Created December 15, 2014 10:03
action_mailer settings for gmail
# Don't care if the mailer can't send
config.action_mailer.raise_delivery_errors = false
config.action_mailer.default_url_options = { :host => 'localhost:3000' }
config.action_mailer.delivery_method = :smtp
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = false
config.action_mailer.default :charset => "utf-8"
config.action_mailer.smtp_settings = {
address: "smtp.gmail.com",
port: 587,
@Nosfheratu
Nosfheratu / UsersService.cs
Last active August 29, 2015 14:07
Simple Login in Code Behind
using System;
using System.IO;
using System.Reflection;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Simple.Data;
using PoS.Entities;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
public class Program
{
public static void Main()
{
var year = DateTime.Now.Year;
myControl.KeyDown += (s, e) =>
{
if (e.KeyCode == Keys.WHATEVER_KEY)
Validate();
};
@Nosfheratu
Nosfheratu / ruby-trick-trips
Created September 8, 2013 18:10
Usefull Ruby code snippets
# capitalize each word of a string
'some string'.split(' ').map {|w| w.capitalize }.join(' ')
@Nosfheratu
Nosfheratu / _disqus.html.haml
Created September 4, 2013 09:36
Disqus up and running on Rails
#disqus_thread
:javascript
// put the short name you signed up with here
var disqus_shortname = 'example';
var disqus_developer = #{ Rails.env == "production" ? '0' : '1' };
var disqus_title = "#{ title }";
var disqus_url = "#{ request.url }";
var disqus_identifier = "#{ request.fullpath }";
(function() {
var dsq = document.createElement('script');
@Nosfheratu
Nosfheratu / Override RefineryCMS
Last active December 22, 2015 06:38
Everything you can override in a refinerycms project with refinerycms-blog
When starting a project that includes refinerycms-blog:
$ rake refinery:override view=refinery/pages/*
$ rake refinery:override view=layouts/*
$ rake refinery:override view=refinery/blog/shared/*
$ rake refinery:override view=refinery/blog/posts/*
$ rake refinery:override view=refinery/*
$ rake refinery:override controller=refinery/blog/*
$ rake refinery:override controller=refinery/*
@Nosfheratu
Nosfheratu / RefineryCMS
Last active December 21, 2015 23:38
This is a step-by-step guide to install and deploy a Refinery CMS application on Heroku
==Configuration==
Ubuntu 12.04 LTS, precise
ruby 2.0.0p0 (2013-02-24 revision 39474) [i686-linux]
Rails 3.2.13
--Prerequisites
***I have a Vagrant for my development environment (avoid this, this is transparent for you...)
#Junk Files
*.DS_Store
[Tt]humbs.db
#Visual Studio Files
[Oo]bj
[Bb]in
[Dd]ebug
[Bb]uild/
*.user