Skip to content

Instantly share code, notes, and snippets.

View rn0's full-sized avatar
:bowtie:
testing

Piotr Kapera rn0

:bowtie:
testing
View GitHub Profile
@rn0
rn0 / README.markdown
Created April 3, 2012 17:40 — forked from Yavari/README.markdown
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
@rn0
rn0 / README.markdown
Created April 3, 2012 17:40 — forked from Yavari/README.markdown
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
@rn0
rn0 / bootstrap-grid.css
Created March 3, 2012 19:36 — forked from abitgone/bootstrap-grid.css
Grid Overlay for Twitter Bootstrap
/*
* Grid Overlay for Twitter Bootstrap
* Assumes a 1.692em baseline grid (22px/13px)
*/
@media (min-width: 1200px) {
body {
background: -webkit-linear-gradient(
90deg,
rgba(0,0,0,0.05),
rgba(0,0,0,0.05) 4.545%,
@rn0
rn0 / form.html
Created March 1, 2012 14:31 — forked from patashnik/form.html
Forms "dynamic" validators
<form method="post">
<div>
<label>First <input type="radio" name="choice" value="1" /></label>
<input type="text" name="first_text" />
</div>
<div>
<label>Second <input type="radio" name="choice" value="2" /></label>
<input type="text" name="second_text" />
</div>
</form>
@rn0
rn0 / README.markdown
Created February 20, 2012 00:22 — forked from gudbergur/README.markdown
Bootstrap's Typeahead plugin extended (allowing for AJAX functionality) among other things

This is an extension to 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
@rn0
rn0 / jquery.elastic.js
Last active October 1, 2016 06:09
My version of the jquery elastic plugin. Let's you update the textarea height whenever you feel. Original: http://www.unwrongest.com/projects/elastic/.
/**
* @name Elastic+
* @descripton grow and shrink your textareas automatically
*
* @author Casey W. Stark
* @author-email casey@thestarkeffect.com
* @author-website http://thestarkeffect.com
*
* @license MIT License - http://www.opensource.org/licenses/mit-license.php
*
@rn0
rn0 / remote-typeahead.js
Created February 16, 2012 23:45 — forked from geuis/remote-typeahead.js
Remote data querying for Twitter Bootstrap 2.0 Typeahead without modifications
// 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.
var autocomplete = $('#searchinput').typeahead()
.on('keyup', function(ev){
ev.stopPropagation();
ev.preventDefault();
@rn0
rn0 / installation.sh
Created December 18, 2011 00:17 — forked from mikhailov/installation.sh
Nginx+passenger application config: ssl redirection, http headers, passenger optimal settings. see details: http://mikhailov.posterous.com/nginx
$ cd /usr/src
$ wget http://nginx.org/download/nginx-0.8.52.tar.gz
$ tar xzvf ./nginx-0.8.52.tar.gz
$ rm ./nginx-0.8.52.tar.gz
$ gem install s3sync capistrano capistrano-ext passenger --no-ri --no-rdoc
$ passenger-install-nginx-module
# Automatically download and install Nginx? 2. No: I want to customize my Nginx installation
# Where is your Nginx source code located?: /usr/src/nginx-0.8.52
# Where do you want to install Nginx to?: /opt/nginx
@rn0
rn0 / node-and-npm-in-30-seconds.sh
Created August 20, 2011 23:14 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl http://npmjs.org/install.sh | sh
@rn0
rn0 / GzipFilter.php
Created August 7, 2011 20:50 — forked from timewasted/GzipFilter.php
Assetic gzip filter
<?php
namespace Assetic\Filter;
use Assetic\Asset\AssetInterface;
use Assetic\Util\ProcessBuilder;
/**
* Runs assets through gzip.
*/