Skip to content

Instantly share code, notes, and snippets.

Avatar

Tal Safran talsafran

View GitHub Profile
@talsafran
talsafran / index.html
Created Dec 9, 2011
HTML code from Hursh and Tal's Skillshare Class
View index.html
<html>
<head>
<title>Shmoogle!</title>
<link rel="stylesheet" type="text/css" href="index.css" />
</head>
<body>
<div id="container">
<img src="http://bit.ly/shmoogle" />
@talsafran
talsafran / index.css
Created Dec 9, 2011
CSS code from Hursh and Tal
View index.css
body {
text-align: center;
}
#container {
font-family: arial;
margin-top: 200px;
}
#search-text {
View regular rake routes
tal:~/Projects/pierre $ rake routes
:public is no longer used to avoid overloading Module#public, use :public_folder instead
from /Users/tal/.rvm/gems/ruby-1.9.2-p290@pierre/gems/resque-1.19.0/lib/resque/server.rb:12:in `<class:Server>'
WARNING: Possible conflict with Rake extension: String#ext already exists
WARNING: Possible conflict with Rake extension: String#pathmap already exists
rake aborted!
stack level too deep
Tasks: TOP => routes => environment
(See full trace by running task with --trace)
@talsafran
talsafran / application.html.erb
Created Sep 24, 2012
jQuery selector scoping technique using currying
View application.html.erb
<html>
...
<body class="<%= "#{params[:controller]} #{params[:action]}" %>">
...
</body>
</html>
@talsafran
talsafran / louis.md
Created Nov 3, 2012
Email from Louis CK
View louis.md

Hello. Its louis here. I'm clacking this to you on my phone in my dressing room here at studio 8H, right in 30 rockefeller center, in Manhattan, new york city, new york, america, world, current snapshot of all existence everywhere.

Tonight I'm hosting Saturday Night Live, something I zero ever in my life saw happening to me. And yet here it is completely most probably happening (I mean, ANYTHING could NOT happen. So we'll see).

I've been working here all week with the cast, crew, producers and writers of SNL, and with Lorne Michaels. Such a great and talented group of people.

And here we are in the middle of New York City, which was just slammed by a hurricane, leaving behind so much trouble, so much difficulty and trauma, which everyone here is still dealing with every day.

Last night we shot some pre-tape segments in greenwich Village, which was pitch black dark for blocks and blocks, as it has been for a week now.

View Junto Numero Uno
Fire Spinning
Q: How do I hold and spin the poi?
A: You can hold the poi any way that feels comfortable. You can use arm action, wrist action, or a combination of both.
Q: How can I get better at a "triple weave?"
A: Break it down, then reassemble. Learn each individual arm movement, then combine.
J: This may be more suitable for the way I think (breaking things into simple steps, then combining to do something complex)
A: Just go for it. Keep trying together, 'til you get it.
J: Sometimes this approach is faster – you're trying to reach your goal immediately, instead of waiting to perfect steps one at a time.
View 2-translation-definitions.rb
EVENT_TRANSLATIONS = {
'users#create' => 'User Created',
'users#update' => 'User Updated',
'orders#new' => 'Order Started',
'orders#create' => 'Order Created',
'orders#update' => 'Order Updated'
}
View 3-track-translated-events.rb
class ApplicationController < ActionController::Base
after_action :track_event
private
def track_event
mixpanel.track(event_user, event_name)
end
def event_user
View 4-sending-custom-properties.rb
class ApplicationController < ActionController::Base
...
private
def track_event
mixpanel.track(event_user, event_name, event_properties)
end
def event_properties