Skip to content

Instantly share code, notes, and snippets.

View msurguy's full-sized avatar

Maksim Surguy msurguy

View GitHub Profile
@msurguy
msurguy / index.html
Created December 4, 2012 17:23 — forked from nhunzaker/index.html
Article 1 - Twittermap Basic Construction
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Twitter Map</title>
<link rel="stylesheet" href="css/style.css" />
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.3/jquery.min.js"></script>
@msurguy
msurguy / gist:4003696
Created November 2, 2012 19:12 — forked from Termina1/gist:3928508
meteor deploy cake task
exec = require('child_process').exec
ssh = require 'NodeSSH'
scp = require 'scp'
deploy = (host, name, pass, path, start = true, port=3001) ->
client = new ssh host, name, pass
console.log 'connecting to server'
client.connect ->
client.once 'data', ->
console.log 'cleaning old code'
client.write "cd #{path}\r\n"
@msurguy
msurguy / index.html
Created October 26, 2012 19:02
A CodePen by Maksim Surguy. CSS3 Thumbnails - Photo thumbnails of various styles : embossed, cutout, taped, Glossy, reflected, Morph and glow on hover, iphone style icons.
<h4>Inspired by <a href="http://webdesignerwall.com/tutorials/css3-image-styles">http://webdesignerwall.com/tutorials/css3-image-styles</a></h4>
<div class="box normal">
<h3>Normal Image (without jQuery background image wrap)</h3>
<a href="http://bootsnipp.com"><img src="http://png.findicons.com/files/icons/2682/construction/128/22.png" ></a>
<a href="http://bootsnipp.com"><img src="http://png.findicons.com/files/icons/2682/construction/128/21.png"></a>
<a href="http://bootsnipp.com"><img src="http://png.findicons.com/files/icons/2682/construction/128/20.png"></a>
</div>
@msurguy
msurguy / gist_line_numbers.css
Created October 18, 2012 18:36 — forked from potch/gist_line_numbers.css
CSS to add line numbers to embedded gists
.gist-highlight {
border-left: 3ex solid #eee;
position: relative;
}
.gist-highlight pre {
counter-reset: linenumbers;
}
.gist-highlight pre div:before {
@msurguy
msurguy / auth.php
Created September 28, 2012 21:03 — forked from mwesten/auth.php
Laravel 3 Auth Controller
<?php
class Auth_Controller extends Base_Controller {
public $restful = true;
public function __construct() {
$this->filter( 'before', 'guest' )->except( array( 'logout', 'validate' ) );
// Note: We may not always require CSRF on login for system based logins so ignore it here.
$this->filter( 'before', 'csrf' )->on( 'post' )->except( array( 'login' ) );
}
@msurguy
msurguy / awesome-php.md
Created September 27, 2012 00:59 — forked from ziadoz/awesome-php.md
Awesome PHP Libraries

Awesome PHP Libraries

A list of amazingly awesome PHP libraries that you should be using:

@msurguy
msurguy / custom.js
Created September 22, 2012 00:36 — forked from nextroy/custom.js
Dynamic (AJAX) loaded Bootstrap Modal (Bootstrap 2.0) : Fix for removing the response Modal content
$(document).ready(function() {
// Support for AJAX loaded modal window.
// Focuses on first input textbox after it loads the window.
$('[data-toggle="modal"]').bind('click',function(e) {
e.preventDefault();
var url = $(this).attr('href');
if (url.indexOf('#') == 0) {
$('#response_modal').modal('open');
} else {
@msurguy
msurguy / custom.js
Created September 22, 2012 00:36 — forked from drewjoh/custom.js
Dynamic (AJAX) loaded Bootstrap Modal (Bootstrap 2.1)
$(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 {
@msurguy
msurguy / snippet.xml
Created September 16, 2012 04:16 — forked from JeffreyWay/snippet.xml
Laravel Resource - Sublime Text 2 Snippet
<snippet>
<content><![CDATA[
// ${1} Resource
Route::get('${1}s', array('as' => '${1}s', 'uses' => '${1}s@index'));
Route::get('${1}s/(:any)', array('as' => '${1}', 'uses' => '${1}s@show'));
Route::get('${1}s/new', array('as' => 'new_${1}', 'uses' => '${1}s@new'));
Route::get('${1}s/(:any)edit', array('as' => 'edit_${1}', 'uses' => '${1}s@edit'));
Route::post('${1}s', '${1}s@create');
Route::put('${1}s/(:any)', '${1}s@update');
Route::delete('${1}s/(:any)', '${1}s@destroy');
@msurguy
msurguy / README.markdown
Created September 5, 2012 20:25 — forked from gudbergur/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