Skip to content

Instantly share code, notes, and snippets.

View sudara's full-sized avatar
🧪
Brewing new formulas

Sudara sudara

🧪
Brewing new formulas
View GitHub Profile
delegate: function(rules) {
return function(e) {
var target = $(e.target);
// first check the target itself
for(var selector in rules){
if (target.is(selector))
return rules[selector].apply(this, $.makeArray(arguments));
}
// then, jump up to parents
for(var selector in rules){
@sudara
sudara / gist:28514
Created November 24, 2008 16:27 — forked from smoofles/gist:28510
/* • lpl modal */
/* lepilo modal dialog */
/* include low pro for jquery, then.... */
Model = $.klass({
initialize = function() {
$('#cancel_modal').mouseup(function() {
set :mongrel_base_port, 5000
set :mongrel_restart_delay, 30
set :mongrel_count, 2
namespace :mongrel do
task :restart, :roles => [:app], :except => {:mongrel => false} do
(mongrel_base_port..(mongrel_base_port+mongrel_count)).to_a.each do |port|
sudo "/usr/bin/monit restart mongrel_#{monit_group}_#{port}"
sleep mongrel_restart_delay
end
2.5) Connections expiration time
--------------------------------
It is possible (and recommended) to configure several time-outs on TCP
connections. Three independant timers are adjustable with values specified
in milliseconds. A session will be terminated if either one of these timers
expire.
- the time we accept to wait for data from the client, or for the client to
accept data : 'clitimeout' :
@sudara
sudara / gist:126671
Last active August 30, 2015 10:34
Bobby's rules
1. Seek out Private instruction (don't be too proud)
2. Write out a daily schedule
3. Set goals to chart development
4. Concentrate, if you practice mistakes you'll play mistakes
5. Relax, practice slowly, tense guitarists don't last
6. Spend more time on things that give you the most trouble
7. Make everything musical, give yourself to everything, even exercises
8. Don't be too hard on yourself
9. Don't show off, if you play for applause, that's all you get
10. Think for yourself, but don't be lazy
I'll tell you my story, maybe it will help. I can't guarantee the experience would be the same for you, or that you have Carpal Tunnel Syndrome, but hopefully at least some bits and pieces will help.
I first noticed trouble in Santa Fe 5 years ago or so. My right wrist would hurt. Pain. Weakness. Tingling. Numbness. Lack of endurance and strength. It was frustrating. I began to research things and figured I had the onset of CTS.
After plugging along for a while, things got bad. I couldn't hold a cup of coffee or open a door with my right hand. It was completely powerless and useless and was in constant throbbing pain. The worst symptoms lasted for months as I tried to figure out how to best 'get rid of it.'
I walked around wearing a forearm splint on my right forearm and hand to prevent movement. I had to keep working (as I was one out of 2 people running this small business) - so I learned how to mouse with my left hand so that I could still get some stuff done. Eventually, the problem started showing up
set :mongrel_base_port, 5000
set :mongrel_restart_delay, 30
set :mongrel_count, 2
namespace :mongrel do
task :restart, :roles => [:app], :except => {:mongrel => false} do
(mongrel_base_port..(mongrel_base_port+mongrel_count)).to_a.each do |port|
sudo "/usr/bin/monit restart mongrel_#{monit_group}_#{port}"
sleep mongrel_restart_delay
end
# Grab all users
q = SC.Query.create({recordType:Listenapp.User});
var users = Listenapp.alonetone.findAll(q);
# Ok, now only get users starting with S
filter = SC.Query.create({recordType:Listenapp.User, conditions: 'name STARTS_WITH_S'});
var filtered_users = Listenapp.alonetone.findAll(filter);
// Grab all users
q = SC.Query.create({recordType:Listenapp.User});
var users = Listenapp.alonetone.findAll(q);
// Ok, now only get users starting with S
q.set('conditions':'name STARTS_WITH "A"); //does not work actually, get syntax error
// If I hack the data_source
if(SC.instanceOf(fetchKey, SC.Query) && fetchKey.conditions === undefined) return [];
// ==========================================================================
// Listenapp.App Fixtures
// ==========================================================================
sc_require('models/nav');
Listenapp.Nav.FIXTURES = [
// TODO: Add your data fixtures here.
// All fixture records must have a unique guid and a type matching the