Skip to content

Instantly share code, notes, and snippets.

View miclovich's full-sized avatar
😇
Working, what else?

Victor miclovich

😇
Working, what else?
View GitHub Profile
# app/controllers/users/password_controller.rb
class Users::PasswordsController < Devise::PasswordsController
def resource_params
params.require(:user).permit(:email, :password, :password_confirmation)
end
private :resource_params
end

Ruby on Rails development setup on Ubuntu 12.04

System update

# change mirror to ubuntu.osuosl.org first
sudo apt-get update

Install common libraries

sudo apt-get install build-essential libreadline-dev libssl-dev zlib1g-dev libxml2-dev libxslt-dev

@miclovich
miclovich / mr_demo.py
Created August 22, 2013 17:32
mr_demo.py
"""
DemoTime
========
About
-----
DemoTime is a simple app that searches the Twitter API for what your
namesake or any other name(someone with your name, other than you) might have said.
It uses the twitter Search API to search for stuff; once that is found, it sends you a
message of the tweet to your phone; it will only send a tweet that has more than 5
@miclovich
miclovich / findrange.java
Created June 10, 2013 14:54
sorting and making your life a whole lot easier
/*
* File: FindRange.java
* Name:
* Section Leader:
* --------------------
* This file is the starter file for the FindRange problem.
*/
import java.util.ArrayList;
@miclovich
miclovich / gist:5748957
Created June 10, 2013 14:06
resursive.java
/*
* File: PythagoreanTheorem.java
* Name:
* Section Leader:
* -----------------------------
* This file is the starter file for the PythagoreanTheorem problem.
*/
import acm.program.*;
@miclovich
miclovich / guess-it-or-lose.py
Created April 7, 2013 21:07
Guessing games
import random
word_basket = []
def split_string(str, delimiter):
return str.split(delimiter)
def guess_word(word_basket, random_int=None):
@miclovich
miclovich / kannel.conf
Created October 12, 2011 13:51
kannel (adopted from daveycrokett's kannel conf file)
#
group = core
admin-port = 13000
smsbox-port = 13001
admin-password = maw
status-password = maw
admin-allow-ip = "127.0.0.1"
log-level = 1
box-allow-ip = "*.*.*.*"
<VirtualHost *:80>
WSGIDaemonProcess site-2 python-path=/path/to/applicaiton/ user=${APACHE_RUN_USER} group=${APACHE_RUN_USER} threads=25
WSGIProcessGroup site-2
ServerName example.com
ServerAlias www.example.com
WSGIScriptAlias / /home/user/prod/applicaiton/application/wsgi.py