Skip to content

Instantly share code, notes, and snippets.

@zziuni
zziuni / stuns
Created September 18, 2012 08:05
STUN server list
# 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 / shufflePlayList.scpt
Created February 5, 2023 02:30
Applescript shuffle play playlist on OSX
tell application "Music"
activate
set shuffle mode to songs
set shuffle enabled to yes
play the playlist named "Power Music"
end tell
@zziuni
zziuni / ts
Created November 9, 2022 16:53
Testing gist for sharing
const foo = 1
@zziuni
zziuni / jshint_angular.js
Created May 8, 2013 06:57
jshint comment for testing angularjs
/*global angular:true */
'use strict';
@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
.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 / 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);
}
}
},
@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 / 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 / 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);
}
}
});