Skip to content

Instantly share code, notes, and snippets.

View jasoet's full-sized avatar
🎯
Focusing

Deny Prasetyo jasoet

🎯
Focusing
View GitHub Profile
<!-- Hibernate Statistics Monitoring -->
<!-- Publishing session factory to be able view statistics -->
<bean id="sessionFactory" factory-bean="entityManagerFactory"
factory-method="getSessionFactory" />
<bean id="hibernateStatisticsMBean" class="org.hibernate.jmx.StatisticsService">
<property name="sessionFactory" ref="sessionFactory" />
</bean>
<bean id="mbeanExporter" class="org.springframework.jmx.export.MBeanExporter">
<property name="beans">
@jasoet
jasoet / User.js
Created November 27, 2012 01:10
User.js
Ext.define('Rima.controller.User', {
extend:'Ext.app.Controller',
views:[ 'user.List', 'user.Edit' ],
allowWrite:Rima.util.SecurityHelper.isWriteAllowed("USER_WRITE"),
models:[ 'User', 'Jabatan', 'UnitSatuanKerja'],
stores:[ 'Users', 'Jabatan', 'UnitSatuanKerja'],
refs:[
{
ref:'userList',
selector:'userList'
@jasoet
jasoet / gist:4706003
Created February 4, 2013 10:17
Menambahkan Script di Chrome Dev Tool. Contoh ini meload jQuery.
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js';
document.head.appendChild(script);
@jasoet
jasoet / gist:4706102
Created February 4, 2013 10:47
Meload JQuery di Google Chrome Dev Tool. Kemudian memanipulasi Halaman menggunakan JQuery
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'http://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js';
document.head.appendChild(script);
//=====================================
jQuery('header').remove();
jQuery('div.row.clear-navbar').remove();
jQuery('footer').remove();
jQuery('.disqus').remove();
@jasoet
jasoet / gist:4744094
Created February 9, 2013 05:50
Mengaktifkan Color Di Terminal dan di GUAKE
#Mengaktifkan di Terminal Console
#nano ~/.bashrc
#uncomment #force_color_prompt=yes
#Mengaktifkan di Guake
#$ echo $TERM
#$ dumb
#then,
#nano ~/.bashrc
@jasoet
jasoet / .gitignore
Created February 14, 2013 17:13
.gitignore Template
logs
# Eclipse Setting
/.metadata
/Servers
.settings
.project
.classpath
.buildpath
RemoteSystemsTempFiles
@jasoet
jasoet / applicationContext.xml
Last active December 15, 2015 16:39
Config Spring Application Context
<?xml version="1.0" encoding="windows-1252"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:c="http://www.springframework.org/schema/c"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:flow="http://www.springframework.org/schema/webflow-config"
xmlns:jee="http://www.springframework.org/schema/jee"
xmlns:jms="http://www.springframework.org/schema/jms"
xmlns:lang="http://www.springframework.org/schema/lang"

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@jasoet
jasoet / ZIP and Rename
Last active December 22, 2015 14:18
Zip and Rename
#!/bin/bash
IFS=$'\n'
for f in $(find $1 -type d ); do
echo $f
zip -r $f $f
#mv -f $f `echo $f | sed s/zip/cbz/`
done
@jasoet
jasoet / ApplicationContextProvider
Created November 22, 2013 17:10
ApplicationContext Singleton Provider
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
/**
* Created with IntelliJ IDEA.
* User: Deny Prasetyo
* Date: 4/2/13
* Time: 11:00 PM
* To change this template use File | Settings | File Templates.
*/