Skip to content

Instantly share code, notes, and snippets.

@BlancosWay
BlancosWay / README.md
Created November 29, 2015 07:15 — forked from Dr-Nikson/README.md
Auth example (react + redux + react-router)

Sass/Less Comparison

In this document I am using Sass's SCSS syntax. You can choose to use the indented syntax in sass, if you prefer it, it has no functional differences from the SCSS syntax.

For Less, I'm using the JavaScript version because this is what they suggest on the website. The ruby version may be different.

Variables

@BlancosWay
BlancosWay / pom.xml
Created November 24, 2015 12:40 — forked from robizz/pom.xml
maven configuration to run AWS SWF Java Library with Java 8 and AWS SDK 1.9.27 in Eclipse
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<!-- adapted from: https://github.com/pedropaulovc/aws-flow-maven-eclipse-samples
then upgraded to 1.9.27 and java 1.8 following http://stackoverflow.com/a/28843218/4094090 -->
<modelVersion>4.0.0</modelVersion>
<groupId>com.amazonaws.services.simpleworkflow.flow</groupId>
<artifactId>startstop</artifactId>
<version>1.8.4</version>
@BlancosWay
BlancosWay / defaults-overrides.md
Created November 21, 2015 07:27 — forked from ericelliott/defaults-overrides.md
ES6 defaults / overrides pattern

ES6 Defaults / Overrides Pattern

Combine default parameters and destructuring for a compact version of the defaults / overrides pattern.

function foo ({
    bar = 'no',
    baz = 'works!'
  } = {}) {
@BlancosWay
BlancosWay / simple-redux.js
Created November 15, 2015 20:16 — forked from conorhastings/simple-redux.js
A very (read: don't do this) simple implementation of redux
/*
* The reason for this is just a thought exercise
* often people(myself super included) are so confused
* when trying something new, but breaking it down
* to it's simplest existence can be the best way to understand
*/
function createStore(reducer, initState) {
let state = initState;
let subscribers = [];
@BlancosWay
BlancosWay / download_egghead_videos.md
Created November 11, 2015 22:14 — forked from ldong/download_egghead_videos.md
download egghead videos

Download videos from egghead

Go to the egghead website, i.e. Building a React.js App

run

$.each($('h4 a'), function(index, video){
  console.log(video.href);
});
@BlancosWay
BlancosWay / osx-mongodb-rlimits-fix.md
Created September 26, 2015 18:53 — forked from tamitutor/osx-mongodb-rlimits-fix.md
Fix Mongodb "soft rlimits" Warning On Mac OS X (Yosemite)

If you are seeing Mongo soft rlimits warnings in your logs, or a WARNING: soft rlimits too low. Number of files is 256, should be at least 1000 when you login to mongo shell via mongo from the commandline, or any mysterious/unexplained mongo connection errors... follow this how-to exactly and it will resolve the issue for you.

(Source of this how to found at basho/basho_docs#1402)

First file: sudo vi /Library/LaunchDaemons/limit.maxfiles.plist

...containing:

@BlancosWay
BlancosWay / load_script_from_chrome.md
Last active August 29, 2015 14:26 — forked from ldong/load_script_from_chrome.md
load script from chrome dev tools

Load Script from Chrome Dev tools

var scriptSrc='//cdnjs.cloudflare.com/ajax/libs/html2canvas/0.4.1/html2canvas.js';
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'script.js';
script.src = scriptSrc;
document.head.appendChild(script);