Skip to content

Instantly share code, notes, and snippets.

View .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
View syntax.css
.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 / jshint_angular.js
Created May 8, 2013
jshint comment for testing angularjs
View jshint_angular.js
/*global angular:true */
'use strict';
@zziuni
zziuni / highChartSample.js
Created Sep 25, 2012
High chart Axis's labels formatter
View highChartSample.js
xAxis: {
type: 'datetime',
tickPixelInterval: 150,
labels: {
formatter: function() {
return Highcharts.dateFormat('%H:%M:%S', this.value);
}
}
},
@zziuni
zziuni / springController.java
Created Sep 25, 2012
Spring controller method sample
View springController.java
@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 / stuns
Created Sep 18, 2012
STUN server list
View stuns
# source : http://code.google.com/p/natvpn/source/browse/trunk/stun_server_list
# A list of available STUN server.
stun.l.google.com:19302
stun1.l.google.com:19302
stun2.l.google.com:19302
stun3.l.google.com:19302
stun4.l.google.com:19302
stun01.sipphone.com
stun.ekiga.net
@zziuni
zziuni / forEach.js
Created Aug 9, 2012
Array.forEach and NodeList.forEach Compatibility
View forEach.js
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 / gist:2963891
Created Jun 21, 2012
enable LoadMask for Extjs4.1
View gist:2963891
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 / extensions.js
Created Nov 9, 2011 — forked from firejune/extensions.js
The minimap provides you with a new way to visualize your site.
View extensions.js
/** pQuery! LOL **/
Object.extend($, Prototype);
Object.extend($, Object);
/**
* Returns window dimensions and scroll positions
* @author Firejune<to@firejune.com>
* @license MIT
*/
@zziuni
zziuni / host
Created Oct 12, 2011
korean ad banner domian in my host file
View host
# 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.
#