Skip to content

Instantly share code, notes, and snippets.

View hasokeric's full-sized avatar
👋

Haso Keric hasokeric

👋
View GitHub Profile
@clouddueling
clouddueling / routes.php
Created February 27, 2013 22:48
username in url laravel
Event::listen('404', function()
{
$username = URI::segment(1);
$user = User::where_username($username)
->where_type('account')
->first();
if ($user != null) {
if ($user->username != '') {
@ndarville
ndarville / business-models.md
Last active January 13, 2024 17:27
Business models based on the compiled list at http://news.ycombinator.com/item?id=4924647. I find the link very hard to browse, so I made a simple version in Markdown instead.

Business Models

Advertising

Models Examples
Display ads Yahoo!
Search ads Google
@adrianhove
adrianhove / remote-typeahead.js
Created April 4, 2012 02:24 — forked from geuis/remote-typeahead.js
Remote data querying for Twitter Bootstrap 2.0 Typeahead without modifications, this fork adds the functionality of getting the clicked item's value
<script>
// Charles Lawrence - Feb 16, 2012. Free to use and modify. Please attribute back to @geuis if you find this useful
// Twitter Bootstrap Typeahead doesn't support remote data querying. This is an expected feature in the future. In the meantime, others have submitted patches to the core bootstrap component that allow it.
// The following will allow remote autocompletes *without* modifying any officially released core code.
// If others find ways to improve this, please share.
//User clicked some value by Adrian Hove
var autocomplete = $('#searchinput').typeahead()
.on('keyup', function(ev){
//User clicked some value
@gudbergur
gudbergur / README.markdown
Created February 19, 2012 23:49
Bootstrap's Typeahead plugin extended (allowing for AJAX functionality) among other things

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
// Execute BAQ with parameter
using (var session = new Epicor.Mfg.Core.Session("user", "secret", "AppServerDC://server:port"))
{
// DynamnicQuery for BAQ
var dynamicQuery = new Epicor.Mfg.BO.DynamicQuery(session.ConnectionPool);
// Build Parameters DS
QueryExecutionDataSet executionDS = new QueryExecutionDataSet();
// Actual parameter row
@tecoholic
tecoholic / osm2geo.js
Created November 27, 2011 04:57
OSM2GEO - A JS Converter to convert OSM to GeoJSON
/**************************************************************************
* OSM2GEO - OSM to GeoJSON converter
* OSM to GeoJSON converter takes in a .osm XML file as input and produces
* corresponding GeoJSON object.
*
* AUTHOR: P.Arunmozhi <aruntheguy@gmail.com>
* DATE : 26 / Nov / 2011
* LICENSE : WTFPL - Do What The Fuck You Want To Public License
* LICENSE URL: http://sam.zoy.org/wtfpl/
*