Skip to content

Instantly share code, notes, and snippets.

@zziuni
zziuni / RequestAnimationFrame.js
Created May 26, 2011 18:32 — forked from mrdoob/RequestAnimationFrame.js
Provides requestAnimationFrame in a cross browser way.
/**
* Provides requestAnimationFrame in a cross browser way.
* @author paulirish / http://paulirish.com/
*/
if ( !window.requestAnimationFrame ) {
window.requestAnimationFrame = ( function() {
return window.webkitRequestAnimationFrame ||
@zziuni
zziuni / host
Created October 12, 2011 00:27
korean ad banner domian in my host file
# Copyright (c) 1993-2009 Microsoft Corp.
#
# This is a sample HOSTS file used by Microsoft TCP/IP for Windows.
#
# This file contains the mappings of IP addresses to host names. Each
# entry should be kept on an individual line. The IP address should
# be placed in the first column followed by the corresponding host name.
# The IP address and the host name should be separated by at least one
# space.
#
@zziuni
zziuni / extensions.js
Created November 9, 2011 09:15 — forked from firejune/extensions.js
The minimap provides you with a new way to visualize your site.
/** pQuery! LOL **/
Object.extend($, Prototype);
Object.extend($, Object);
/**
* Returns window dimensions and scroll positions
* @author Firejune<to@firejune.com>
* @license MIT
*/
@zziuni
zziuni / gist:2963891
Created June 21, 2012 04:51
enable LoadMask for Extjs4.1
Ext.define("Ext.view.AbstractView.LoadMask", {
override: "Ext.view.AbstractView",
onRender: function() {
this.callParent();
if (this.loadMask && Ext.isObject(this.store)) {
this.setMaskBind(this.store);
}
}
});
@zziuni
zziuni / forEach.js
Created August 9, 2012 11:42
Array.forEach and NodeList.forEach Compatibility
if ( !Array.prototype.forEach ) {
Array.prototype.forEach = function(fn, scope) {
for(var i = 0, len = this.length; i < len; ++i) {
fn.call(scope || this, this[i], i, this);
}
}
}
if ( !NodeList.prototype.forEach ) {
NodeList.prototype.forEach = function(fn, scope) {
@zziuni
zziuni / springController.java
Created September 25, 2012 05:19
Spring controller method sample
@RequestMapping(value = "/deleteWorkingSet.do", method = RequestMethod.POST)
// @ResponseStatus(value = HttpStatus.INTERNAL_SERVER_ERROR)
public @ResponseBody
Map<String, Object> deleteWorkingSet(String wsId) {
Map<String, Object> result = new HashMap<String, Object>();
try {
projectService.deleteWorkingSet(wsId);
result.put("success", true);
} catch (Exception e) {
logger.error("deleteWorkingSet", e);
@zziuni
zziuni / highChartSample.js
Created September 25, 2012 06:29
High chart Axis's labels formatter
xAxis: {
type: 'datetime',
tickPixelInterval: 150,
labels: {
formatter: function() {
return Highcharts.dateFormat('%H:%M:%S', this.value);
}
}
},
.highlight {
background-color: #efefef;
padding: 7px 7px 7px 10px;
border: 1px solid #ddd;
-moz-box-shadow: 3px 3px rgba(0,0,0,0.1);
-webkit-box-shadow: 3px 3px rgba(0,0,0,0.1);
box-shadow: 3px 3px rgba(0,0,0,0.1);
margin: 20px 0 20px 0;
overflow: hidden;
@zziuni
zziuni / .jshintrc
Last active December 30, 2015 02:49 — forked from haschek/.jshintrc
{
// --------------------------------------------------------------------
// JSHint Configuration, Strict Edition
// --------------------------------------------------------------------
//
// This is a options template for [JSHint][1], using [JSHint example][2]
// and [Ory Band's example][3] as basis and setting config values to
// be most strict:
//
// * set all enforcing options to true
@zziuni
zziuni / jshint_angular.js
Created May 8, 2013 06:57
jshint comment for testing angularjs
/*global angular:true */
'use strict';