Skip to content

Instantly share code, notes, and snippets.

@dolzenko
dolzenko / tinymce-content.css
Created July 14, 2009 12:23
Style un-reset for TinyMCE content inserted on the pages with YUI CSS reset
/* Style un-reset for TinyMCE content inserted on the pages with YUI CSS reset.
* Added along with YUI CSS reset to the content_css option of TinyMCE and to the page on which TinyMCE content should be displayed.
*/
/* This part is based on tinymce-3.2.1.1\jscripts\tiny_mce\themes\advanced\skins\default\content.css */
.mceContentBody,
.mceContentBody td,
.mceContentBody pre
{
@php-coder
php-coder / Article.java
Created November 24, 2011 10:51
JPA @EntityListeners example
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
@bromanko
bromanko / clone-rackspace-container.js
Created February 20, 2012 16:28
Cloudfiles Copy Container
var cloudfiles = require('cloudfiles');
request = require('request');
// CloudFiles client configuration
var configCloudFiles = {
auth: {
username: '',
apiKey: '',
host: 'auth.api.rackspacecloud.com'
}
@smathot
smathot / clickplot.py
Created March 10, 2012 13:31
Clickable interactive matplotlib figure
#!/usr/bin/env python
#-*- coding:utf-8 -*-
from matplotlib import pyplot
import numpy as np
class ClickPlot:
"""
A clickable matplotlib figure
@tbranyen
tbranyen / backbone.collectioncache.js
Created June 4, 2012 06:37
Backbone.Collection caching by URL
/*!
* backbone.collectioncache.js v0.0.2
* Copyright 2012, Tim Branyen (@tbranyen)
* backbone.collectioncache.js may be freely distributed under the MIT license.
*/
(function(window) {
"use strict";
// Dependencies
@bijukunjummen
bijukunjummen / gist:3315275
Created August 10, 2012 16:08
Test Cache with Spring Cache Abstraction
package org.bk.samples.cache;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import org.junit.Test;
@thegrubbsian
thegrubbsian / backbone.events.extensions.js
Created September 8, 2012 04:10
Proxy or forward Backbone events through a mediator
(function() {
var proxy = function(source, eventName) {
var _self = this;
source.on(eventName, function(evt) {
var args = Array.prototype.slice.apply(arguments).splice(1);
args.unshift(evt);
_self.trigger.apply(_self, args);
});
};
@fclairamb
fclairamb / log4j2.rolling.xml
Last active April 6, 2023 16:45
log4j2.xml sample setup files: * rolling: To enable rolling logging. * setup file to log on file (rotation should be handled by logrote), syslog (to collect all the logs from the different services) and console...
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<properties>
<property name="name">app</property>
<property name="pattern">%d{yyyy-MM-dd HH:mm:ss.SSS} | %-5.5p | %-10.10t | %-20.20C:%-5.5L | %msg%n</property>
<!--
It will look like that:
2013-04-03 07:37:51.993 | WARN | main | lnetgateway.Server:56 | My app is logging stuff
-->
</properties>
@hofmannsven
hofmannsven / README.md
Last active May 3, 2024 15:30
Git CLI Cheatsheet
@jonathandixon
jonathandixon / .gitignore
Last active January 5, 2021 22:01
Cordova CLI project .gitignore and helper script. Useful when you don't want to commit the platforms and plugins directories to version control. http://stackoverflow.com/q/17911204/417568
platforms/
plugins/