Skip to content

Instantly share code, notes, and snippets.

View Gaya's full-sized avatar
🌱
Coding on plants

Gaya Kessler Gaya

🌱
Coding on plants
View GitHub Profile
@Gaya
Gaya / redux-form-react-quill.jsx
Created November 9, 2017 16:00
How to use React Quill inside Redux Forms
import React from 'react';
import { Field } from 'redux-form';
import ReactQuill from 'react-quill';
function renderQuill({ input }) {
return (
<ReactQuill
{...input}
onChange={(newValue, delta, source) => {
if (source === 'user') {
@Gaya
Gaya / class-symbolic-press.php
Last active June 23, 2021 18:39
Symbolic Press is a helper to help you use your WordPress plugins with Symbolic Links. Read more on my blog: http://www.gayadesign.com/diy/using-wordpress-plugins-as-symbolic-links/
<?php
/**
* Symbolic Press is a helper to help you use your WordPress plugins with Symbolic Links.
*
* Read more about it on:
* @link http://www.gayadesign.com/diy/using-wordpress-plugins-as-symbolic-links/
*/
class Symbolic_Press {
public $plugin_path;
public $plugin_name;
@Gaya
Gaya / hoc.js
Last active February 16, 2021 10:09
Pure Component HOC in React
import React from 'react';
const someProp = 'We want to pass this as a prop';
// hip and short notation
export const wrapComponent = (UncomposedComponent) => (props) => <UncomposedComponent {...props} someProp={someProp} />;
// Or broken down:
// a factory which wraps a component
import { useEffect, useReducer } from 'react';
type PromiseState<T> = {
isPending: false;
isResolved: false;
isError: false;
} | {
isPending: true;
isResolved: false;
isError: false;
@Gaya
Gaya / responsive-svg-sprite-template.scss
Last active September 15, 2017 14:19
Responsive SVG Sprite Mixin
/*
* Generate a SVG-sprite mixin for Sass
* ====================================
*
* Gaya Kessler - http://gaya.ninja - http://twitter.com/GayaNinja
*
* SVGSprite is a wonderful package, but doesn't enable responsive sprites out of the box.
* This moustache template generates a sass file with a mixin for the generated SVG-sprite.
* Calculates the position and size of the background by filename.
* Included SVG image scales to width and height.
@Gaya
Gaya / filmDownload.md
Last active April 10, 2017 10:23
Hoe je een film download met torrents.

Hoe download ik een film via torrents?

Dit is een korte uitleg hoe je gemakkelijk een film kan downloaden via torrents. Omdat meerdere mensen mij de vraag stellen hoe ik dit doe heb ik er snel een pagina voor opgezet.

Wat heb je nodig?

  1. Een torrent client
  2. Website waar torrents beschikbaar zijn.
  3. Videospeler
function add(thing) {
// dit krijg 'eng' van residentEvil();
// maak alvast een functie die later in then() aangeroepen wordt
return function(list) {
// list = ['leuk']
return list.concat([thing]);
}
}

Keybase proof

I hereby claim:

  • I am gaya on github.
  • I am gaya (https://keybase.io/gaya) on keybase.
  • I have a public key whose fingerprint is 24A6 24FF 20C0 FEDE C90E 72BD 87AD E542 3F7E 019E

To claim this, I am signing this object:

@Gaya
Gaya / (Build)Gruntfile.js
Last active January 17, 2017 05:23
Gruntfile.js file for concatenation and watch tasks.
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
options: {
separator: "\n", //add a new line after each file
banner: "", //added before everything
footer: "" //added after everything
},
@Gaya
Gaya / fill-container-floats.css
Last active January 4, 2016 03:09
Fills container height containing floating elements without setting `overflow: hidden`.
.container:after {
content: "";
clear: both;
display: table;
}
//or as a mixin
@mixin clearfix {
&:after {
content: "";