This file contains hidden or 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
| // Use Gists to store code you would like to remember later on | |
| console.log(window); // log the "window" object to the console |
This file contains hidden or 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
| // Load the SDK asynchronously | |
| (function(d, s, id) { | |
| var js, fjs = d.getElementsByTagName(s)[0]; | |
| if (d.getElementById(id)) return; | |
| js = d.createElement(s); js.id = id; | |
| js.src = "//connect.facebook.net/en_US/sdk.js"; | |
| fjs.parentNode.insertBefore(js, fjs); | |
| }(document, 'script', 'facebook-jssdk')); | |
| window.fbAsyncInit = function() { |
This file contains hidden or 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
| html { | |
| height: 100%; | |
| background: url(bg.jpg) no-repeat center center; | |
| background-size: cover; | |
| } |
This file contains hidden or 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
| def index | |
| logger.debug @statuses.inspect | |
| end |
This file contains hidden or 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
| (function($){ | |
| //pass in just the context as a $(obj) or a settings JS object | |
| $.fn.autogrow = function(opts) { | |
| var that = $(this).css({overflow: 'hidden', resize: 'none'}) //prevent scrollies | |
| , selector = that.selector | |
| , defaults = { | |
| context: $(document) //what to wire events to | |
| , animate: true //if you want the size change to animate | |
| , speed: 200 //speed of animation | |
| , fixMinHeight: true //if you don't want the box to shrink below its initial size |
This file contains hidden or 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
| //On any command line: | |
| lsof -wni tp:3000 | |
| //You will see a column labeled "PID". Get that number. | |
| kill -9 PID#HERE //e.g. kill -9 704 | |
| //If this fails, RESTART machine => has worked before |
This file contains hidden or 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
| rm -rf testapp |
This file contains hidden or 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
| vagrant ssh |
This file contains hidden or 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
| $(document).ready(function () { | |
| $.getJSON('../data/employees.json', function (data) { | |
| var statusHTML = '<ul class="bulleted">'; | |
| $.each(data,function (index, employee) { | |
| if (employee.inoffice === true) { | |
| statusHTML +='<li class="in">'; | |
| } else { | |
| statusHTML +='<li class="out">'; | |
| } | |
| statusHTML += employee.name + '</li>'; |
OlderNewer