⌘T | go to file |
⌘⌃P | go to project |
⌘R | go to methods |
⌃G | go to line |
⌘KB | toggle side bar |
⌘⇧P | command prompt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input type="button" id="start" value="Start Life" onclick="life.toggleLife();"> | |
<input type="button" value="Clear" onclick="life.clear();"> | |
<canvas id="universe" width="500" height="500"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var SomeModel = Backbone.Model.extend({}); | |
someModel = new SomeModel(); | |
someModel.bind("change", function(model, collection){ | |
alert("You set some_attribute to " + model.get('some_attribute')); | |
}); | |
someModel.set({some_attribute: "some value"}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Demo.Views.Page = Backbone.View.extend({ | |
className: "page", | |
initialize: function () { | |
this.render(); | |
}, | |
show: function () { | |
$('.page').css({"position": "absolute"}); | |
var direction_coefficient = this.options.back ? 1 : -1; | |
if ($('.page').length) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#overlay-objet img').droppable({ | |
tolerance: 'pointer', | |
drop: _.bind(function(event, ui) { | |
object = $(event.target); | |
if (object.attr("data-val") != undefined){ | |
objectDrag = object.attr('data-val').toString(); | |
objectDrop = $(ui.draggable).attr('data-val').toString(); | |
//$(ui.draggable).removeClass('objet-drag').addClass('objet-hover'); | |
object.addClass('hidden'); | |
$('#'+object.attr('data-toggle')).removeClass('hidden'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// inside of a controller call: | |
Session::flash('status_success', 'Succesfully submitted!'); | |
// inside of your view : | |
<script> | |
@if (!is_null(Session::get('status_success'))) | |
@if (is_array(Session::get('status_success'))) | |
@foreach (Session::get('status_success') as $success) | |
displayMessage('{{$success }}', "success"); |