Skip to content

Instantly share code, notes, and snippets.

@isyoon
isyoon / somefn.js
Created January 25, 2012 03:33
somefn1
var Somefn = function(){
var test = 123;
return {
fn1 : function(){
return test*2;
},
fn2 : function(){
return Somefn.fn1()-test;
}
};
var Somefn = function(){
var test = 123,
that = {
fn1 : function(){
return test*2;
},
fn2 : function(){
return that.fn1()-test;
}
};
@isyoon
isyoon / gist:2231572
Created March 28, 2012 23:45
spring config
<!-- load prop -->
<bean id="webProp" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
<property name="locations">
<list>
<value>classpath:/web-config.xml</value>
</list>
</property>
</bean>
<!--- blah ---->
@isyoon
isyoon / gist:2231616
Created March 28, 2012 23:52
spring eval
<%@taglib uri="http://www.springframework.org/tags" prefix="spring"%>
<spring:eval expression="@webProp" var="webProp" scope="request"/>
blah blah ~~
${webProp['config.url']}
@isyoon
isyoon / Bio.js
Last active December 17, 2015 23:49
!!
var a_k_a = 'Dev1';
if(you_notice_a_bug_or_have_any_feedback) {
console.log('Please let me know!');
var It_will_be_fixed = function() {
console.log('Resolved');
},
_in = 43200000; //12 hours
setTimeout(It_will_be_fixed, _in);
} else {
console.log('Enjoy!!');
@RequestMapping("{id}")
public ModelAndView info(@PathVariable("id") String sId, HttpServletRequest req, SitePreference sitePreference, Device device) {
Long id;
Series series;
try {
id = Long.valueOf(sId);
series = seriesService.findById(id);
} catch (NumberFormatException nfe) {
series = seriesService.findByUrl(sId);