Skip to content

Instantly share code, notes, and snippets.

Rendall rendall

Block or report user

Report or block rendall

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
rendall / isPalindrome.js
Last active May 26, 2019
isPalindrome(str) returns true if str is a palindrome
View isPalindrome.js
const isPalindrome = (p, normalized) =>
normalized === undefined?
isPalindrome(null, p.replace(/\W/g,"").toLowerCase())
: normalized.length <= 1? true
: normalized.slice(-1) === normalized.slice(0,1)?
isPalindrome(null, normalized.slice(1,normalized.length-1))
: false
// isPalindrome first strips 'p' of symbols, spaces and converts to lowercase
// return true if 'normalized' is 1 or 0 letters which are trivial palindromes
View .vimrc
set nocompatible " be iMproved, required
" To enable project-specific vim settings: e.g. ./project/.vimrc
set exrc
syntax enable
colorscheme torte
set backspace=indent,eol,start
let mapleader = ','
set number
rendall / uniq.js
Last active May 26, 2019
returns an array with duplicate elements stripped.
View uniq.js
const uniq = (arr) => arr.reduce((acc,e) => acc.indexOf(e) >= 0? acc : [...acc, e], [])
// uniq([1,1,1,2,2,3,3,4,4,4,5,6,6]) => [1,2,3,4,5,6]
// arr.reduce iterates through arr's elements,
// check if the array 'acc' contains the element 'e'
// If so, make no change to 'acc' (assign 'acc' to 'acc')
// If not, add 'e' to 'acc'
// After iteration, return 'acc'
// Older version:
rendall / InfernoRouterJSX.d.ts
Last active Sep 29, 2017
TSX type definitions for the Inferno library 'inferno-router'
View InfernoRouterJSX.d.ts
// The repo for this file is now here:
// This gist is deprecated.
// This is a lightly modified version of the react-router typedefs, to be used alongside InfernoJSX.d.ts:
// Please do let me know of any problems or issues:
// Type definitions for React Router 4.0
// Project:
// Definitions by: Sergey Buturlakin <>
// Yuichi Murata <>
rendall / InfernoJSX.d.ts
Last active Oct 11, 2017
Inferno JSX Typescript type definitions
View InfernoJSX.d.ts
// This gist is deprecated. The repo for this file is now here:
// This is lightly modified version of the React typedefs with 'React' replaced by 'InfernoJSX'.
// Use it as you would any @type library, and it will stop that annoying typescript / jsx error
// when you're using Typescript with Inferno.
// Please do let me know of any problems or issues:
// Inferno's VNode is compatible with JSX.Element, so you can do something like this:

Keybase proof

I hereby claim:

  • I am rendall on github.
  • I am rendall ( on keybase.
  • I have a public key ASCQAUvXTIMQUOpgwMnEjjU96nXmB0_pV-oqdZb2LwM3ego

To claim this, I am signing this object:

You can’t perform that action at this time.