Skip to content

Instantly share code, notes, and snippets.

View renemendoza's full-sized avatar
:octocat:

Rene Mendoza renemendoza

:octocat:
View GitHub Profile
[root@servicenter ~]# netstat -anp | grep 5038
tcp 0 0 0.0.0.0:5038 0.0.0.0:* LISTEN 12276/asterisk
tcp 0 0 127.0.0.1:5038 127.0.0.1:33289 ESTABLISHED 12276/asterisk
tcp 0 0 127.0.0.1:5038 127.0.0.1:33288 ESTABLISHED 12276/asterisk
tcp 0 0 127.0.0.1:33289 127.0.0.1:5038 ESTABLISHED 13073/ruby
tcp 0 0 127.0.0.1:33288 127.0.0.1:5038 ESTABLISHED 13073/ruby
current_app_name = File.basename(File.expand_path(root))
run "rm README"
run "rm public/index.html"
# ---------------------- Git ----------------------
def commit_state(comment)
git :add => "."
git :commit => "-am '#{comment}'"
@renemendoza
renemendoza / .gitconfig
Created November 3, 2009 17:23
git setup for development workstations
[user]
email = myname@myserver.com
name = myname
[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
@renemendoza
renemendoza / rails_setup
Created November 3, 2009 17:31
rails setup for new apps
#turn this into a script!!
#APP_NAME=your app name
#GITHUB_USER_NAME=your git hub user name
#GITHUB_PROYECT_NAME=your git hub proyect name
#rails setup for new apps
#create app skeleton for mysql
rails -d mysql APP_NAME
#generate database.yml in the future
add instructions to setup an usable VIM complete with nice colorschemes ruby and asterisk syntax recognitions and tpope vim-rails
@renemendoza
renemendoza / rails_app_config_yml
Created December 28, 2009 01:39
configurable yaml option file for rails applications
#create RAILS_ROOT/config/initializers/load_app_config.rb
raw_config = File.read(RAILS_ROOT + "/config/app_config.yml")
APP_CONFIG = YAML.load(raw_config)[RAILS_ENV].symbolize_keys
#create RAILS_ROOT/config/app_config.yml
development:
{
"id": "dialer",
"server_roles": [
"dialer"
],
"type": {
"dialer": [
"rails",
"unicorn"
]
174.143.212.230 [Tue, 26 Oct 2010 04:08:08 +0000] INFO: Client key /etc/chef/client.pem is not present - registering
174.143.212.230 [Tue, 26 Oct 2010 04:08:08 +0000] WARN: HTTP Request Returned 409 Conflict: Client already exists.
174.143.212.230 [Tue, 26 Oct 2010 04:08:09 +0000] WARN: HTTP Request Returned 404 Not Found: Cannot load node llamarada
174.143.212.230 [Tue, 26 Oct 2010 04:08:13 +0000] INFO: Setting the run_list to ["role[production]", "role[dialer_database_master]", "role[dialer]"] from JSON
174.143.212.230 [Tue, 26 Oct 2010 04:08:15 +0000] INFO: Starting Chef Run (Version 0.9.12)
174.143.212.230 [Tue, 26 Oct 2010 04:08:17 +0000] INFO: Storing updated cookbooks/asterisk/recipes/default.rb in the cache.
174.143.212.230 [Tue, 26 Oct 2010 04:08:17 +0000] INFO: Storing updated cookbooks/asterisk/attributes/asterisk.rb in the cache.
174.143.212.230 [Tue, 26 Oct 2010 04:08:17 +0000] INFO: Storing updated cookbooks/asterisk/README in the cache.
174.143.212.230 [Tue, 26 Oct 2010 04:08:17 +0000] INFO: St
174.143.212.230 [Tue, 26 Oct 2010 04:08:08 +0000] INFO: Client key /etc/chef/client.pem is not present - registering
174.143.212.230 [Tue, 26 Oct 2010 04:08:08 +0000] WARN: HTTP Request Returned 409 Conflict: Client already exists.
174.143.212.230 [Tue, 26 Oct 2010 04:08:09 +0000] WARN: HTTP Request Returned 404 Not Found: Cannot load node llamarada
174.143.212.230 [Tue, 26 Oct 2010 04:08:13 +0000] INFO: Setting the run_list to ["role[production]", "role[dialer_database_master]", "role[dialer]"] from JSON
174.143.212.230 [Tue, 26 Oct 2010 04:08:15 +0000] INFO: Starting Chef Run (Version 0.9.12)
174.143.212.230 [Tue, 26 Oct 2010 04:08:17 +0000] INFO: Storing updated cookbooks/asterisk/recipes/default.rb in the cache.
174.143.212.230 [Tue, 26 Oct 2010 04:08:17 +0000] INFO: Storing updated cookbooks/asterisk/attributes/asterisk.rb in the cache.
174.143.212.230 [Tue, 26 Oct 2010 04:08:17 +0000] INFO: Storing updated cookbooks/asterisk/README in the cache.
174.143.212.230 [Tue, 26 Oct 2010 04:08:17 +0000] INFO: St
{
"name": "dialer_database_master",
"default_attributes": {
},
"json_class": "Chef::Role",
"run_list": [
"recipe[mysql::server]",
"recipe[database::master]"
],
"description": "",