Skip to content

Instantly share code, notes, and snippets.

View satlavida's full-sized avatar

Satyajeet Nigade satlavida

View GitHub Profile
@satlavida
satlavida / Gemfile
Created December 10, 2011 06:49 — forked from gvarela/Gemfile
web sockets with eventmachine and redis pub/sub
# A sample Gemfile
source "http://rubygems.org"
gem "redis"
gem 'eventmachine', :git => 'git://github.com/eventmachine/eventmachine.git'
gem "em-hiredis"
# gem "em-synchrony"
gem "em-websocket"
he = 1
around = 1;
to = (a) ->
return a
me = (a) ->
return a
hide = "Hide quick, he is here"
alert me to hide if he is around
window.Events = {}
_.extend Events, Backbone.Events
window.Model = Backbone.Model.extend
window.Collection = Backbone.Collection.extend
window.Router = Backbone.Router.extend
window.View = Backbone.View.extend
addSubview: (ele) ->
@el.append(ele)
@implementation Satlavida : NSObject
{
NSArray Skills;
}
-(NSArray)returnSkills
{
return Skills = ["PHP","Ruby","Objective-C","Objective-J","Cocoa","Java/Coffee-script","HTML5"];
}
@implementation CalendarView: CPView
{
}
-(id)init {
self = [super initWithFrame:CGRectMake(0, 0, 200, 200)];
if (self) {
[self loadData];
}
@satlavida
satlavida / CPNavigationBar.j
Created October 4, 2011 15:01 — forked from nickjs/CPNavigationBar.j
CPNavigationController & CPViewController
/*
* CPNavigationBar.j
* AppKit
*
* Created by Nicholas Small.
* Copyright 2009, 280 North, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@satlavida
satlavida / CPLightbox.j
Created October 4, 2011 15:01 — forked from nickjs/CPLightbox.j
CPLightbox Modals and Sheets
/*
* CPLightbox.j
* AppKit
*
* Created by Nicholas Small.
* Copyright 2009, 280 North, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
@satlavida
satlavida / gist:1261864
Created October 4, 2011 15:00 — forked from justingraves/gist:180177
A little rounded black tooltip you can easily point at stuff
/*
* CPTooltip.j
* Makes a little black rounded-rect gradient tooltip with some text (can have multiple lines with \n) which points at something.
* Usage example:
* tooltip = [[CPTooltip alloc] initWithText:@"Hello There" atPoint:CPPointMake(100,100)];
* [self addSubview:tooltip];
*
* The above will make a tooltip that says "Hello There" which is pointing at this view's 100x100 point.
* If the tooltip is too close to its superview's edges, it will adjust itself to maintain readability.
*
"puts :hi"
<?php
class DB
{
public static function __callStatic($name,$args)
{
$q= "";
$query = explode("_",$name);
if($query[0] == "get")
{