Skip to content

Instantly share code, notes, and snippets.

@kuzvac
kuzvac / ChildComponent.tsx
Last active February 22, 2019 08:59
mapDispatchToProps typesafe-actions
import * as React from "react";
interface IOwnProps {
someDispatchProps: () => void,
someMapStateToProps: "string",
someProps: "string",
}
export const ChildComponent: React.StatelessComponent<IOwnProps> = ({someDispatchProps, someMapStateToProps, someProps}) => {
return (
import { buildAction } from 'typesafe-actions';
export const authActions = {
getLoggedUser: buildAction('GET_LOGGED_USER').empty(),
fetchAuth: buildAction('AUTH').async<
{
pending: boolean
email: string,
password: string
},
@kuzvac
kuzvac / HeatLayer.js
Created May 6, 2016 11:22
Leaflet.heat fixed radius
import simpleheat from 'simpleheat';
/*
(c) 2014, Vladimir Agafonkin
Leaflet.heat, a tiny and fast heatmap plugin for Leaflet.
https://github.com/Leaflet/Leaflet.heat
*/
L.HeatLayer = (L.Layer ? L.Layer : L.Class).extend({
// options: {
@kuzvac
kuzvac / gravityform-sections.php
Created December 28, 2015 12:36 — forked from DMSpeed/gravityform-sections.php
Allows you to wrap a section of fields on a Gravity Form in a CSS class
//* Format specific sections in a Gravity Form - code based on
// http://www.jordancrown.com/multi-column-gravity-forms/ and https://sridharkatakam.com/splitting-gravity-forms-fields-into-2-columns/
function gform_format_sections( $content, $field, $value, $lead_id, $form_id ) {
if( !IS_ADMIN ) { // only perform on the front end
// target section breaks
if( $field['type'] == 'section' ) {
$form = RGFormsModel::get_form_meta( $form_id, true );
// check for the presence of formatted section class
@kuzvac
kuzvac / style.css
Created December 28, 2015 12:04 — forked from srikat/style.css
Sample CSS for styling Gravity Forms in Genesis. http://sridharkatakam.com/sample-css-styling-gravity-forms-genesis/
.entry .gform_wrapper {
max-width: 100%;
margin-bottom: 28px;
}
.gform_wrapper ul li.gfield {
margin-bottom: 20px;
}
.entry .gform_wrapper input[type=text],
@kuzvac
kuzvac / gravityforms
Created December 25, 2015 12:22 — forked from iaanvn/gravityforms
Gravity Forms CSS Structure
.gform_wrapper {
// Steps
.gf_page_steps{
.gf_step{
}
.gf_step_active{
@kuzvac
kuzvac / Gruntfile.js
Created August 29, 2014 14:27 — forked from markgoodyear/01-gulpfile.js
Comparison between gulp and Grunt. See http://markgoodyear.com/2014/01/getting-started-with-gulp/ for a write-up.
/*!
* Grunt
* $ npm install grunt-contrib-uglify grunt-autoprefixer grunt-contrib-cssmin grunt-contrib-imagemin grunt-contrib-sass grunt-contrib-watch grunt-contrib-concat grunt-contrib-clean grunt-contrib-jshint grunt-notify --save-dev
*/
module.exports = function(grunt) {
grunt.initConfig({
// Sass