Skip to content

Instantly share code, notes, and snippets.

View iruslani's full-sized avatar

Iwan iruslani

View GitHub Profile
@iruslani
iruslani / index-bootstrap.html
Created October 30, 2012 20:25
Twitter Index page with Raw Github links
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Bootstrap, from Twitter</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- Le styles -->
@iruslani
iruslani / index-boilerplate.html
Created October 30, 2012 20:20
Boilerplate Index page with Raw Github links
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title></title>
<meta name="description" content="">
<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.css" />
<script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
<script src="http://code.jquery.com/mobile/1.2.0/jquery.mobile-1.2.0.min.js"></script>
@iruslani
iruslani / jquery ready
Created October 5, 2012 19:24
jquery document ready function script
<script>
$(document).ready(function() {
// Handler for .ready() called.
});
</script>
@iruslani
iruslani / gist:3351518
Created August 14, 2012 18:32
Accept jsp parameter and set a boolean value
<%
// Take product ID from redirect parameter:
String prod= request.getParameter("prod");
boolean freeProduct = false;
if ((request.getParameter("prod") == null)) {prod = "0";}
if (prod.equals("0")) {freeProduct = true;}
%>
@iruslani
iruslani / gist:3343074
Created August 13, 2012 18:41
HTML file with jquery, underscore and backbone already included
<!DOCTYPE html>
<html>
<head>
<title>I have a backbone</title>
<style>
</style>
</head>
<body>
@iruslani
iruslani / redirect.js
Created August 13, 2012 18:39
JavaScript to redirect
<script language="javascript">
document.location.href=('redirect/location.htm');
</script>
@iruslani
iruslani / django-command
Created July 5, 2012 22:02
Django Command Notes
###Python Command Notes:###
#How to start the server:
>python manage.py runserver
# then you can view the page here: (http://127.0.0.1:8000/)
#How to start the python interpreter:
@iruslani
iruslani / gist:2932628
Created June 14, 2012 20:11
Basic JSP code to grab a url parameter.
<%
String version = request.getParameter("version");
if ("new".equals(version)) { %>
<jsp:include page="/jsp/pages/newversion.jsp" flush="true" />
<% } else { %>
<p>show this page </p>
<% } %>
@iruslani
iruslani / gist:2920427
Created June 12, 2012 22:07
Basic Javascript function Syntax.
// A simple function
var greet = function(person, greeting) {
var text = greeting + ', ' + person;
console.log(text);
};
greet('Iwan', 'Hello');
// A Function that returns a value