Skip to content

Instantly share code, notes, and snippets.

View pujie's full-sized avatar
👨‍🍳
Enjoying @nGular

pujie pujie

👨‍🍳
Enjoying @nGular
View GitHub Profile
@pujie
pujie / rptserver.js
Last active August 29, 2015 14:16
report server
<html>
<head>
<link rel='stylesheet' href='http://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/css/bootstrap.min.css' />
<link href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet">
<style>
h2{
font-weight:bold;
}
table#tbl1{
width:100%;
#!/bin/bash
#mysql -h localhost -u root -p --execute "create database teknis"
mysql -h localhost -u root -p <doquery.sql
@pujie
pujie / ajaxupload.3.5.js
Created June 14, 2015 13:22
initialize upload function, using ajax image upload (http://valums.com/ajax-upload)
/**
* Ajax upload
* Project page - http://valums.com/ajax-upload/
* Copyright (c) 2008 Andris Valums, http://valums.com
* Licensed under the MIT license (http://valums.com/mit-license/)
* Version 3.5 (23.06.2009)
*/
/**
* Changes from the previous version:
@pujie
pujie / jsevent
Created June 24, 2015 14:55
give event handler to element
<html>
<head>
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
<table id="myTable">
<tr myid=1>
<td> hullo 1</td>
<td class="clickable"> hullo 1</td>
</tr>
@pujie
pujie / override fullcalendar
Created September 3, 2015 06:27
override fullcalendar
var options = {
theme: true,
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
timeFormat: {
agenda: 'h(:mm)t{ - h(:mm)t}',
'': 'h(:mm)t{-h(:mm)t }'
@pujie
pujie / vhgrid.js
Created April 1, 2011 10:00
vhgrid
<html>
<head>
<script type="text/javascript" src="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" src="vhgrid.main.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("#mybutton").click(function(){
$("#mytable").createTable();
@pujie
pujie / config.php
Created July 5, 2011 09:07
menu library for codeigniter
/*
add this to your config.php
*/
$config['css']='css_style.css';
@pujie
pujie / simulasi-eo.php
Created October 19, 2015 01:32
simulasi login sederhana
<html>
<head>bercanda</head>
<body>
<form action="index.php" method="post">
Nama <input type="text" name="name"/><br />
Pass <input type="text" name="pass"/>
<input type="submit" value="LOGIN">
</form>
<?php
$users = array(
@pujie
pujie / login.html
Created October 19, 2015 03:20
simulasi login 2
<html>
<head>
<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
</head>
<body>
<div>
<input type="text" name="user" id="user"><br />
<input type="text" name="pass" id="pass"><br />
<button id="submit" >Login</button>
</div>
@pujie
pujie / tanggal_regex_php
Created August 10, 2011 09:31
php regex for date (id)
<?php
echo '<h2>yyyy/mm/dd</h2>';
preg_match('/(19[5-9][0-9]|20[0-9][0-9])[\/-](0[1-9]|1[0-2])[\/-](0[1-9]|1[0-9]|2[0-9]|3[01])/','2011/12/30',$match);
foreach($match as $key=>$val){
echo $key . ' => ' . $val . '<br>';
}
echo '<h2>dd/mm/yyyy</h2>';
preg_match('/(0[1-9]|1[0-9]|2[0-9]|3[01])[\/-](0[1-9]|1[0-2])[\/-](19[5-9][0-9]|20[0-9][0-9])/','30/12/2011',$match);
foreach($match as $key=>$val){