Skip to content

Instantly share code, notes, and snippets.

@simkimsia
simkimsia / basic.js
Created September 20, 2012 06:01
Using turnjs with File API of HTML5
/*
* Basic sample
*/
function addPage(file, pageNumber, book) {
var id, pages = book.turn('pages');
var reader = new FileReader();
reader.onload = (function (theImg) {
@simkimsia
simkimsia / basic.js
Created September 20, 2012 06:06
Using turnjs without FileAPI but with prepared images
/*
* Basic sample
*/
function addPage(file, pageNumber, book) {
var id, pages = book.turn('pages');
var reader = new FileReader();
reader.onload = (function (theImg) {
@simkimsia
simkimsia / index.html
Created September 23, 2012 04:00
turnjs + FileReader works but does not work for odd number of pages
<html>
<head>
<style type="text/css">
body{
overflow:hidden;
}
#flipbook{
width:400px;
height:300px;
@simkimsia
simkimsia / dndhtml5.html
Created September 25, 2012 07:16
dnd html5
<html>
<head>
<style type="text/css">
body{
overflow:hidden;
}
#droparea {
width:200px;
height:200px;
@simkimsia
simkimsia / post.html
Created September 25, 2012 10:11
basic html code for blog oppoin
<div class="stopandrespond" style="text-align:center;background-color:#b0c4de;border:1px solid black;">
<strong><font color="red">Stop and do this now.</font></strong>
<br />
If this step doesn't work for you,<a href="#respond">Tell Us!</a>
</div>
@simkimsia
simkimsia / installation-12-10-ubuntu.sh
Last active February 12, 2020 10:46
preparing a fresh 12.10 ubuntu server for cakephp 2.4
#!/bin/bash
###
#
# forked from https://gist.github.com/1264701/08f93534ba177f173b9382b53c419cd0de5b07ea
# Copyright (c) 2011 Cake Development Corporation (http//cakedc.com)
#
# Ubuntu 12.10 based web server installation script
# Run this by executing the following from a fresh install of Ubuntu 12.10 server:
#
@simkimsia
simkimsia / gist:4442745
Created January 3, 2013 11:18
convenient bash script to install guest-additions for virtualbox vm. Run script in ubuntu guest OS. Not host.
#!/bin/bash
###
#
# Copyright (c) 2013 KimSia
#
# Ubuntu 12.10 based web server VirtualBox Guest Additions installation script on Guest Ubuntu
# Run this by executing the following from a fresh install of Ubuntu 12.10 server:
#
# bash -c "$(curl -fsSL https://raw.github.com/gist/4442745)"
@simkimsia
simkimsia / AclGrantDenyShell.php
Last active December 10, 2015 17:08
This is a Cake Shell class that helps to grant and deny access to users or groups based on controller actions. It calls the core AclShell by iterating through a list of permissions. I would love to write a Plugin for everyone to use, but I am not sure how to store the list of permissions in a way it is easy for everybody else to be able to use g…
<?php
class AclGrantDenyShell extends AppShell {
/**
* Contains instance of AclComponent
*
* @var permissions
*/
@simkimsia
simkimsia / install-jenkins-on-ubuntu-12-10.sh
Last active December 7, 2017 19:46
Install jenkins on a fresh ubuntu 12.10.
#!/bin/bash
###
#
# Copyright (c) 2013 KimSia Sim
#
# Ubuntu 12.10 based install jenkins and other related plugins
# Run this by executing the following from a fresh install of Ubuntu 12.10 server:
#
# bash -c "$(curl -fsSL https://gist.github.com/simkimsia/4473000/raw/5e301a3bd399096e7cbbe3b1a877997a117aa7a3/install-jenkins-on-ubuntu-12-10.sh)"