Skip to content

Instantly share code, notes, and snippets.

@smathy
smathy / gh.sh
Created October 7, 2011 00:47 — forked from marioBonales/gh.sh
#!/bin/sh
current_git_branch() {
git_exists=`git branch 2>/dev/null | sed -ne'/^\* /s///p'`
if [[ "$git_exists" != "" ]]; then
if [[ "$git_exists" == "(no branch)" ]]; then
git_exists="\e[31m\]$git_exists\e[0m\]"
fi
echo "$git_exists "
#!/bin/sh
git_exists=`git branch 2>/dev/null | sed -ne'/^\* /s///p'`
if [[ "$git_exists" != "" ]]; then
if [[ "$git_exists" == "(no branch)" ]]; then
git_exists="\e[31m\]$git_exists\e[0m\]"
fi
echo "$git_exists "
elif [ -d .svn ]; then
app/controllers/application_controller.rb:29: session[:php] = {}
app/controllers/application_controller.rb:33: session[:php][ k.to_sym ] = v
app/controllers/application_controller.rb:39: session[:php] ||= {}
app/controllers/application_controller.rb:50: ret = session[:php].clone
app/controllers/application_controller.rb:70: session[:php].present? and session[:php][:usuarioid].present? and session[:php][:seccion] == 'extranet'
app/controllers/application_controller.rb:94: @current_legacy_user ||= LegacyUser.find session[:php][:usuarioid]
app/controllers/application_controller.rb:102: @current_client ||= Client.find session[:php][:clienteid] if session[:php][:clienteid]
app/controllers/application_controller.rb:215: return nil unless session[:php].present? and session[:php][:tipo].present?
app/controllers/application_controller.rb:216: session[:php][:tipo].to_sym
app/controllers/course_controller.rb:66: School.school_scope( is_school?, session[:php][:escuelaid] )
aw_ciudad
aw_escuela
aw_escuelaid
aw_pais
carrito_$tipo
cliente_escuelaid
clienteid
clipboard_objectiveid
equipo
failed
.cart_title = t('.title')
%table
= render(cart.line_items)
%tr.total_line
%td{:colspan => "2"} Total
%td.total_cell= number_to_currency(cart.total_price)
= button_to t('.checkout'), new_order_path, method: :get
= button_to t('.empty'), cart, method: :delete, confirm: 'Are you sure?'
in_foobar_queue = (queue_array) ->
ret = false
queue_array.each (queue_id) ->
queue_name = http.get("http://foo.com/queue/#{queue_id}").name
if queue_name == 'foobar'
ret = true
break
return ret
ticket = http.get('http://foo.com/ticket/45')
p ->
a href: "/foo/bar" -> "Text for link"
"Text in between"
a href: "/oink" -> "Text for second link"
@smathy
smathy / gist:1355922
Created November 10, 2011 19:39
Instructions
1. Login to the web interface at: http://mail.amcoonline.net/
2. Go to "Settings"
3. Click on the "Accounts" tab.
4. In the "Send mail as:" block click "Add another email address you own"
5. Type your same username but @amco.me in the "Email address" field, so for [email protected] you will type [email protected]
6. Click the "Next Step" button.
7. Leave the "Send through International Education Services, Inc. Mail (easier to set up)" option selected and click the "Next Step" button.
8. Click the "Send Verification" button.
9. You can close this window now (yes, even though it has a place to enter the verification code, you won't need it).
10. Wait for the email to arrive in your Inbox.
## this
for j in arr
alert i for i in j
## or this
for j in arr
for i in j
alert i