Skip to content

Instantly share code, notes, and snippets.

View fmarani's full-sized avatar

Federico Marani fmarani

View GitHub Profile
CREATE USER 'username'@'localhost' IDENTIFIED BY '...';
GRANT ALL PRIVILEGES ON *.* TO 'username'@'localhost';
GRANT SELECT, LOCK TABLES on Project_app_production.* to 'user'@'localhost';
SHOW GRANTS FOR 'root'@'localhost';
select * from mysql.user;
---
@fmarani
fmarani / examples.scala
Created July 31, 2010 00:36
scala examples
// prime number generator
for (i <- 2 to 1000)
if((2 to i).find( j=> (i % j == 0 && i != j) ) == None)
println(i)
// function currying example
def matcher(haystack: List[Char])(needle: String) = {
haystack contains needle.charAt(0)
}