Skip to content

Instantly share code, notes, and snippets.

@treshugart
treshugart / example.jsx
Last active May 6, 2024 04:53
Give yourself full control over the DOM that any hyperscript VDOM style function creates http://www.webpackbin.com/4kR0ZnXFf
import hify from './create-element';
import React from 'react';
import { render } from 'react-dom';
const h = hify(React.createElement.bind(React));
class Test extends HTMLElement {
static observedAttributes = ['attr']
attributeChangedCallback (name, oldValue, newValue) {
this.innerHTML = `Hello, ${this.getAttribute('attr')}!`;
@cbarraford
cbarraford / install_ixgbevf.bash
Last active November 28, 2019 21:35
Install ixgbevf driver for amazon aws enhanced networking (ubuntu)
aptitude install -y build-essential
wget "http://downloads.sourceforge.net/project/e1000/ixgbevf stable/2.11.3/ixgbevf-2.11.3.tar.gz"
tar -zxf ./ixgbevf-*
cd ixgbevf*/src
make install
modprobe ixgbevf
sudo update-initramfs -c -k all
echo "options ixgbevf InterruptThrottleRate=1,1,1,1,1,1,1,1" > /etc/modprobe.d/ixgbevf.conf
@oscarrenalias
oscarrenalias / ehcache.xml
Created March 1, 2013 08:28
A better ehcache.xml configuration file for the Play Framework, which out of the box limits the size of the cache based on the number of objects you put in it rather than the number of bytes. I personally think that's not a very smart choice. Also see http://ehcache.org/documentation/2.5/configuration/cache-size#cache-configuration-sizing-attrib…
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../config/ehcache.xsd" updateCheck="false">
<!-- This is a default configuration for 256Mb of cached data using the JVM's heap, but it must be adjusted
according to specific requirement and heap sizes -->
<defaultCache
maxBytesLocalHeap="256000000"
eternal="false"
timeToIdleSeconds="120"
timeToLiveSeconds="120"