Skip to content

Instantly share code, notes, and snippets.

@alivedise
alivedise / remove-ftu.patch
Created November 26, 2012 07:55
Byebye Gaia FTU
diff --git a/apps/system/js/window_manager.js b/apps/system/js/window_manager.js
index 2efeea0..8b5b9f6 100644
--- a/apps/system/js/window_manager.js
+++ b/apps/system/js/window_manager.js
@@ -776,7 +776,7 @@ var WindowManager = (function() {
// reference to the app and launch it.
function retrieveFTU() {
window.asyncStorage.getItem('ftu.enabled', function getItem(launchFTU) {
- if (launchFTU === false) {
+ if (true) {
@alivedise
alivedise / index.html
Created November 17, 2012 02:35 — forked from agarzon/index.html
My Html5 template with Jquery and Bootstrap from CDN
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Project Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<link rel="shortcut icon" href="favicon.ico">
<!-- Twitter Bootstrap -->
$.fixture("/foobar.json", function(orig, settings, headers){
return [200, "success", {json: {foo: "bar" } }, {} ]
});
$.fixture("PUT /tasks/{id}.json", function(original, settings, headers){
return { updatedAt : new Date().getTime() }
});
steal('jquery').then('jquery/resize','jquery/mousehold','jquery/event/drag').then('./my.css', function(){
//....

});
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script src="http://threedubmedia.googlecode.com/files/jquery.event.drag-2.0.min.js"></script>
<script src="http://github.com/cowboy/jquery-resize/raw/v1.1/jquery.ba-resize.min.js"></script>
<script src="http://remysharp.com/demo/mousehold.js"></script>
<script src="https://raw.github.com/brandonaaron/jquery-mousewheel/master/jquery.mousewheel.js"></script>
$.Controller("Listener", {
"something.updated subscribe" : function(called, data){
console.log(data.name);
}
});
// called elsewhere
$.Controller("publisher", {
init: function(){
var data = { name: 'lol' };
@alivedise
alivedise / lol.html
Created August 18, 2012 03:43
embedded js
<ul>
<% for(var i=0; i<supplies.length; i++) {%>
<li><%= supplies[i] %></li>
<% } %>
</ul>
@alivedise
alivedise / long.js
Created August 18, 2012 03:40
long html
$('#div').html('<div class="event"><span class="name"></span><span class="icon"></span><span class="content"></span><span class="screenshot"></span></div>')
steal('steal/less').then('a.less', 'b.less').then(function() {
// ...
});
@alivedise
alivedise / collision.css
Created August 17, 2012 14:03
collision
/* a.css */
div.data {
background-color: red;
}
/* b.css */
div.data {
background-color: white;
}