Skip to content

Instantly share code, notes, and snippets.

View paulruescher's full-sized avatar

Paul Ruescher paulruescher

  • Rivian
  • Vancouver, BC
View GitHub Profile
const NotificationHoC = function(Component) {
return React.createClass({
componentDidMount() {
const success = (notifications) => {
this.setState({
notifications: notifications,
});
};
$.ajax({
const Container = React.createClass({
componentDidMount() {
const success = (notifications) => {
this.setState({
notifications: notifications,
});
};
$.ajax({
url: '/notifications',
function fullName(firstName, lastName) {
return `${firstName} ${lastName}`;
}
function createEl(el) {
return document.createElement(el);
}
function wrapContentWithEl(el, content) {
return el.innerHTML = content;
const Container = React.createClass({
componentDidMount() {
const success = (notifications) => {
this.setState({
notifications: notifications,
});
};
$.ajax({
url: '/notifications',
const Container = React.createClass({
componentDidMount() {
const success = (notifications) => {
this.setState({
notifications: notifications,
});
};
$.ajax({
url: '/notifications',
function f(x) {
return x * 10;
}
function g(x) {
return x + 2;
}
f(g(2)); // 40
const notifications = [
{
date: "Nov 10, 2015 8:00:00",
message: "Tagged in a photo",
},
{
date: "Nov 10, 2015 9:00:00",
message: "Mentioned in a post",
},
];
const notifications = [
{
date: "Nov 10, 2015 8:00:00",
message: "Tagged in a photo",
},
{
date: "Nov 10, 2015 9:00:00",
message: "Mentioned in a post",
},
];
const notifications = [
{
date: "Nov 10, 2015 8:00:00",
message: "Tagged in a photo",
},
{
date: "Nov 10, 2015 9:00:00",
message: "Mentioned in a post",
},
];
@paulruescher
paulruescher / gist:3051599
Created July 5, 2012 05:50
Modify Contact Form 7 Form Output
add_filter( 'wpcf7_form_elements', 'rl_wpcf7_form_elements' );
function rl_wpcf7_form_elements( $content ) {
// global $wpcf7_contact_form;
$rl_pfind = '/<p>/';
$rl_preplace = '<p class="wpcf7-form-text">';
$content = preg_replace( $rl_pfind, $rl_preplace, $content, 2 );
return $content;
}