Skip to content

Instantly share code, notes, and snippets.

View sandeepone's full-sized avatar
💭
I may be slow to respond.

Sandeep Sangamreddi sandeepone

💭
I may be slow to respond.
View GitHub Profile
@sandeepone
sandeepone / .gitignore
Created February 9, 2012 21:56 — forked from bergie/.gitignore
Node.js email handling examples
config.json
reading-image.png
@sandeepone
sandeepone / ssl_certificates.crt
Created July 22, 2012 18:46 — forked from kemo/ssl_certificates.crt
List of verified SSL certificates
##
## ca-bundle.crt -- Bundle of CA Root Certificates
##
## Certificate data from Mozilla as of: Sun Feb 19 04:03:37 2012
##
## This is a bundle of X.509 certificates of public Certificate Authorities
## (CA). These were automatically extracted from Mozilla's root certificates
## file (certdata.txt). This file can be found in the mozilla source tree:
## http://mxr.mozilla.org/mozilla/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1
##
@sandeepone
sandeepone / worker3.py
Created September 22, 2012 17:34 — forked from jdmaturen/worker3.py
Redis stats aggregator w/ Gevent
import gevent
from gevent import monkey
monkey.patch_socket()
import hashlib
import os
import redis
@sandeepone
sandeepone / Cached.php
Created January 15, 2013 23:57 — forked from kemo/Cached.php
<?php defined('SYSPATH') or die('No direct script access.');
/**
* Extend this class if you want your model cached. Example usage:
*
* 1. Model
* class Model_User extends ORM_Cached {}
*
* 2. Usage
*
@sandeepone
sandeepone / gist:5309410
Created April 4, 2013 10:39
A sample media model for Gleez CMS
<?php defined('SYSPATH') or die('No direct script access.');
/**
* Core File class for handling media.
*
* This is the API for handling file media, extend this for handling content types.
*
* Note: by design, this class does not do any permission checking.
*
* @package Gleez
* @category Media
@sandeepone
sandeepone / gist:5309456
Created April 4, 2013 10:49
Upload Contorller related to media model
<?php defined('SYSPATH') or die('No direct script access.');
class Controller_Upload extends Controller {
protected $path;
public function before()
{
// Set the proper headers to allow caching
$this->response->headers('Pragma', 'no-cache');
@sandeepone
sandeepone / PHP-5.3-install.sh
Last active December 16, 2015 08:48
Custom php 5.3 with fpm installation
#!/bin/sh
#####################################
# PHP Installer #
# Written For Centos 5.x #
#####################################
# Author: Sandeep Sangamreddi #
# URL: gleez.com #
# GitHub: github.com/sandeepone #
#####################################
@sandeepone
sandeepone / Contact.php
Created April 26, 2013 21:04
Contact controller
<?php defined('SYSPATH') or die('No direct script access.');
class Controller_Contact extends Template {
public function action_index()
{
$this->title = __('Contact');
// Mail type
$types = array(
$(document).ready(function() {
// Support for AJAX loaded modal window.
// Focuses on first input textbox after it loads the window.
$('[data-toggle="modal"]').click(function(e) {
e.preventDefault();
var url = $(this).attr('href');
if (url.indexOf('#') == 0) {
$(url).modal('open');
} else {

This is a fork of Bootstrap Typeahead that adds minimal but powerful extensions.

For example, process typeahead list asynchronously and return objects

  # This example does an AJAX lookup and is in CoffeeScript
  $('.typeahead').typeahead(
    # source can be a function
    source: (typeahead, query) ->
 # this function receives the typeahead object and the query string