⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
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
# You need to install these gems. | |
# - smtp_tls | |
# - pony | |
post "/contact-us" do | |
Pony.mail :to => 'pedro.delgallego@gmail.com', | |
:from => "#{params[:email]}", | |
:subject => "Contact SFT : #{params[:name]}", | |
:body=> "#{params[:body]}, --- Contact Address #{params[:email]}", | |
:via => :smtp, |
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
PS1='\n[\t \u] \[\033[1;33m\]\w\a\[\033[0m\]$(__git_ps1 " \[\033[1;32m\](%s)\[\033[0m\]")' | |
PS1="$PS1 \[\033[1;32m\](\$(~/.rvm/bin/rvm-prompt))\[\033[0m\] \n\$ " |
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
<html> | |
<head> | |
<title>Demo</title> | |
</head> | |
<body> | |
<h1>PHP Mongo Test</h1> | |
<?php | |
try { | |
$connect = $_ENV["MONGOLAB_URI"]; | |
$m = new Mongo($connect); |
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
.fileContainer { | |
overflow: hidden; | |
position: relative; | |
} | |
.fileContainer [type=file] { | |
cursor: inherit; | |
display: block; | |
font-size: 999px; | |
filter: alpha(opacity=0); |
A list of amazingly awesome PHP libraries that you should consider using (and some other shiny extras).
- Composer/Packagist - A package and dependency manager.
- Composer Installers - A multi framework Composer library installer.
- Symfony2 - A framework comprised of individual components.
- Zend Framework 2 - Another framework comprised of individual components.
- Laravel 4 - A simple PHP framework.
- Lithium - Another framework of components.
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
// String utils | |
// | |
// resources: | |
// -- mout, https://github.com/mout/mout/tree/master/src/string | |
/** | |
* "Safer" String.toLowerCase() | |
*/ | |
function lowerCase(str) { | |
return str.toLowerCase(); |
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
# Add the following 'help' target to your Makefile | |
# And add help text after each target name starting with '\#\#' | |
help: ## Show this help. | |
@fgrep -h "##" $(MAKEFILE_LIST) | fgrep -v fgrep | sed -e 's/\\$$//' | sed -e 's/##//' | |
# Everything below is an example | |
target00: ## This message will show up when typing 'make help' | |
@echo does nothing |
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
/Users/samuelsimoes/code/*/log/*.log { | |
missingok | |
rotate 0 | |
size 3M | |
create | |
} |
This is inspired by A half-hour to learn Rust and Zig in 30 minutes.
Your first Go program as a classical "Hello World" is pretty simple:
First we create a workspace for our project:
OlderNewer