- Clone this repo:
git clone git@github.com:emailwizard/emailwizard_essentials.git
- In cloned repo directory run
docker run -v
pwd:/repo -p 9800:9800 emailwizard/emailwizard.sh
- Go to http://localhost:9800
- Preview some template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# old rails | |
Model.find(:all, conditions: [...], order: "...") | |
default_scope | |
named_scope | |
# new rails | |
Model.where(..).order(..).where(..) | |
## |
How to connect to mysql? Normally, this would be enough:
$ mysql -uroot -p
this is simplest way. If your user is not root, than check your user name and substitute root with this username.
If you want to connect to database after login, do $ mysql -uroot -p mydbname
To apply dump, do:
$ mysql -uroot -p mydbname < dumpfile.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Foo | |
def foo | |
super | |
puts "super" | |
end | |
end | |
module Baz | |
def foo | |
puts "foo" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# global obj instance (instance of Object class) | |
puts self | |
# instance of class Class, so we can have objects of this class | |
class Klass | |
@foo = 'bar' | |
puts self #(Klass itself) | |
# we create instance method | |
# or (more precisly) method in current self | |
def foo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"net/http" | |
"bytes" | |
"bufio" | |
"net/http/httputil" | |
"fmt" | |
"log" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# self | |
class Foo | |
# self | |
# belongs_to | |
def Foo.foo | |
@bla = '123' | |
puts 'bla' | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module A | |
class Foo | |
def foo | |
puts 'foo' | |
end | |
end | |
end | |
module B | |
include A |
I was asked once by https://github.com/jjperezaguinaga:
I am of the impression that you have a strong love fan for Go.
What's so cool about it? I'm kind of curious.
So here are my anwsers:
- easy to learn: http://tour.golang.org took me about 15 hours to complete (with browsing documentation)
- language is easy and minimalistic
- awesome standard library
NewerOlder