Skip to content

Instantly share code, notes, and snippets.

View remainstheday's full-sized avatar
💻
Working from home

remainstheday remainstheday

💻
Working from home
View GitHub Profile
@remainstheday
remainstheday / images.js
Created November 14, 2016 16:00
Load images after the page has loaded to avoid lag
/**
* This script wrapped in a Immediately-Invoked Function Expression (IIFE) to
* prevent variables from leaking onto the global scope. For more information
* on IIFE visit the link below.
* @see http://en.wikipedia.org/wiki/Immediately-invoked_function_expression
*/
(function() {
'use strict';
@remainstheday
remainstheday / index.html
Created September 30, 2016 16:29
Center html text with a bottom border
<div class="slogan">
<h1>Developing Interactive User Interfaces</h1>
</div>
@celso
celso / init.vim
Last active March 8, 2024 18:31
Neovim setup for OSX users
syntax on
set ruler " Show the line and column numbers of the cursor.
set formatoptions+=o " Continue comment marker in new lines.
set textwidth=0 " Hard-wrap long lines as you type them.
set modeline " Enable modeline.
set esckeys " Cursor keys in insert mode.
set linespace=0 " Set line-spacing to minimum.
set nojoinspaces " Prevents inserting two spaces after punctuation on a join (J)
" More natural splits
set splitbelow " Horizontal split below current.
@chodorowicz
chodorowicz / redux-ecosystem.md
Last active February 9, 2017 00:41
From Alt to Redux ecosystem (redux-actions, redux-thunk, react-redux, redux-saga)

From Alt to Redux ecosystem (redux-actions, redux-thunk, react-redux, redux-saga)

Jakub Chodorowicz

Young/Skilled

@chodorowicz
github.com/chodorowicz
@tixastronauta
tixastronauta / facebook_leads.md
Last active July 22, 2024 05:23
Receiving Facebook Leads on a Webhook

2015-01-29 Unofficial Relay FAQ

Compilation of questions and answers about Relay from React.js Conf.

Disclaimer: I work on Relay at Facebook. Relay is a complex system on which we're iterating aggressively. I'll do my best here to provide accurate, useful answers, but the details are subject to change. I may also be wrong. Feedback and additional questions are welcome.

What is Relay?

Relay is a new framework from Facebook that provides data-fetching functionality for React applications. It was announced at React.js Conf (January 2015).

@remainstheday
remainstheday / pixelConversions.scss
Created April 11, 2014 18:24
Fun with SASS mixins
@function strip-unit($num) {
@return $num / ($num * 0 + 1);
}
@mixin rem-fallback($property, $values...) {
$max: length($values);
$pxValues: '';
$remValues: '';
@for $i from 1 through $max {
@remainstheday
remainstheday / declaring_objects_in_Javascript.js
Last active November 17, 2016 23:23
The 3 ways to declare objects in javascript
/*
* 1. USING A FUNCTION
* notes: this is not the best solution for
* large applications, because your constructor
* functions are global objects and could accidentally
* be overwritten.
*/
// create a Class Apple
function Apple(type){
@ralphcrisostomo
ralphcrisostomo / array_dupplicate_counter.js
Created July 19, 2012 07:43
Javascript: Count duplicates in an array
/**
Problem:
You have a javascript array that likely has some duplicate values and you would like a count of those values.
Solution:
Try this schnippet out.
*/