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
require 'rubygems' | |
require 'net/ssh' | |
def update_remote_password(hostname, port, username, password, newpassword, print_output=false) | |
begin | |
Net::SSH.start( hostname, username, :password => password, :port => port ) do |session| | |
command = "passwd" |
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
{% for school in custom_modules.schools.records %} | |
<h1>{{ school.name }}</h1> | |
<p>{{ school.description }}</p> | |
<p><b>Students:</b></p> | |
<ul> | |
{% for student in school.students %} | |
<li>{{ student.name }}</li> | |
{% endfor %} |
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
SELECT table_schema "Data Base Name", sum( data_length + index_length ) / 1024 / 1024 "Data Base Size in MB" FROM information_schema.TABLES GROUP BY table_schema ; |
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
data = <<EODATA | |
t.string :physical_address | |
t.string :physical_address2 | |
t.string :physical_city | |
t.integer :physical_state_id | |
t.string :physical_postal_code | |
t.integer :physical_country_id | |
t.string :billing_address | |
t.string :billing_address2 | |
t.string :billing_city |
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
data = <<EODATA | |
| id | int(11) | NO | PRI | NULL | auto_increment | | |
| physical_address | varchar(255) | YES | | NULL | | | |
| physical_address2 | varchar(255) | YES | | NULL | | | |
| physical_city | varchar(255) | YES | | NULL | | | |
| physical_state_id | int(11) | YES | | NULL | | | |
| physical_postal_code | varchar(255) | YES | | NULL | | | |
| physical_country_id | int(11) | YES | | NULL | | | |
| billing_address | varchar(255) | YES | | NULL | | | |
| billing_address2 | varchar(255) | YES | | NULL | | |
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
data = <<EODATA | |
| id | int(11) | NO | PRI | NULL | auto_increment | | |
| status_id | int(11) | YES | | NULL | | | |
| project_type_id | int(11) | YES | | NULL | | | |
| physical_address | varchar(255) | YES | | NULL | | | |
| physical_address2 | varchar(255) | YES | | NULL | | | |
| physical_city | varchar(255) | YES | | NULL | | | |
| physical_state_id | int(11) | YES | | NULL | | | |
| physical_postal_code | varchar(255) | YES | | NULL | | | |
| physical_country_id | int(11) | YES | | NULL | | |
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
Setting: Text Color = #D0DDDE | |
Setting: Background Color = #133441 | |
PS1=\n\[\033[1;31m\]\u\[\033[0;96m\]@\h: \[\033[1;92m\]\w\n\[\033[1;30m\]→ \[\033[0m\] |
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
function parse_git_dirty { | |
[[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*" | |
} | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/[\1$(parse_git_dirty)]/" | |
} | |
export PS1='\n\[\033[1;31m\]\u\[\033[0;96m\]@\h: \[\033[1;92m\]\w \[\033[1;33m\]$(parse_git_branch)\n\[\033[1;33m\]→ \[\033[0m\]' |
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
# set prefix to Ctrl-a | |
set -g prefix C-a | |
unbind C-b | |
# reduce delay btwn chars in cmd seq | |
set -s escape-time 1 | |
# increase repeat time for better multi-hits of cmd | |
set repeat-time 1000 |
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
<?php | |
namespace CHH; | |
trait MetaObject | |
{ | |
protected static $__metaClass; | |
static function setMetaClass(MetaClass $metaClass) | |
{ |
OlderNewer