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 / orm.js
Created June 10, 2022 09:46
my simple orm
showError = obj => {
switch(obj.errCode){
case '1':
return 'No table specified'
break
case '2':
return 'Main table has no name'
break
}
}
@pujie
pujie / flex-responsif.html
Created April 25, 2022 03:56
implementation of responsive flex
<html>
<head>
<title>Transpose</title>
<style>
#main{
display: flex;
flex-direction: row;
color:chartreuse;
}
@media screen and (max-width:1000px){
@pujie
pujie / inspect.js
Created April 13, 2022 09:17
script to inspect input
inspect = {
isNumber : indexes => {
inspect._numberIndexes = indexes
return inspect
},
setParam : param => {
console.log(param)
inspect._param = param
return inspect
},
@pujie
pujie / isEmail.js
Created March 29, 2022 09:04
validate multiple elements
isEmail = element => {
arr1 = element.split('@')
if(arr1.length === 0){
return false
}else if(arr1[0].trim() === ""){
return false
}else if(arr1[1].trim() === ""){
return false
}else{
return true
@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 / 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 / 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 / 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 / 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:
#!/bin/bash
#mysql -h localhost -u root -p --execute "create database teknis"
mysql -h localhost -u root -p <doquery.sql