Skip to content

Instantly share code, notes, and snippets.

View carloscasalar's full-sized avatar
💜
Helping make cities a better place to live at @cabify

Carlos Castillo carloscasalar

💜
Helping make cities a better place to live at @cabify
View GitHub Profile
{"contents":{"css":{"validate":false},"editor":{"formatOnSave":true},"eslint":{"enable":true},"files":{"exclude":{"build/**":false,"dist/**":false,"out/**":false,"test/coverage/**":false}},"less":{"validate":false},"prettier":{"eslintIntegration":false,"stylelintIntegration":false},"search":{"exclude":{"**/build":true,"**/coverage":true,"**/deps":true,"**/node_modules":true,"**/out":true,"**/test":false}},"scss":{"validate":true},"tasks":{"version":"2.0.0","type":"shell","tasks":[{"label":"Jest","command":"${workspaceFolder}/node_modules/.bin/jest","args":["--no-cache"],"options":{"env":{"NODE_ENV":"test","SAVI_ENV":"test"}},"group":"test","presentation":{"clear":true,"panel":"shared","reveal":"always"}},{"label":"Jest - Run Test","command":"${workspaceFolder}/node_modules/.bin/jest","args":["${file}","--detectOpenHandles","--no-cache"],"options":{"env":{"BABEL_ENV":"test","NODE_ENV":"test","SAVI_ENV":"test"}},"group":"test","presentation":{"clear":true,"panel":"shared","reveal":"always"}},{"label":"Jest - Up
@jayphelps
jayphelps / redux-observable-typescript-testing-example.ts
Created February 24, 2019 05:33
Example using redux-observable + typescript + TestScheduler, with a run helper written
import { map, delay } from 'rxjs/operators';
import { TestScheduler } from 'rxjs/testing';
import { Action } from 'redux';
import { Epic, ofType, ActionsObservable, StateObservable } from 'redux-observable';
const scheduler = new TestScheduler((actual, expected) => {
if (JSON.stringify(actual) !== JSON.stringify(expected)) {
throw new Error(`Failing test
actual: ${JSON.stringify(actual, null, 2)}
@bloudermilk
bloudermilk / README.md
Created March 23, 2012 19:07
Facebook Page Categories

All of the categories!

I wrote a really simple JavaScript script that uses jQuery to extract all the categories from Facebook's "Create a page" page.

Instructions

  1. Navigate to the Create a page page.
  2. jQuerify the page.
  3. Open up your JavaScript console of choice and run the following script:
@briceburg
briceburg / Dockerfile
Last active August 21, 2021 06:02
laravel 5 - running in a docker container
FROM alpine
ENV \
APP_DIR="/app" \
APP_PORT="80"
# the "app" directory (relative to Dockerfile) containers your Laravel app...
COPY app/ $APP_DIR
RUN apk add --update \
@mschmulen
mschmulen / README.md
Last active August 23, 2022 22:42 — forked from anonymous/README.md
LoopBack cheat sheet. git clone https://gist.github.com/6740321.git LoopBackCheatSheet

#LoopBack cheat sheet

##Recipies

LoopBack from api-example

Instantiate the sls-sample-app

slc example
cd sls-sample-app
slc install
@brendanzab
brendanzab / reactive_systems_bibliography.md
Last active October 10, 2022 06:36
A reading list that I'm collecting while building my Rust ES+CQRS framework: https://github.com/brendanzab/chronicle

Functional, Reactive, and Distributed Systems Bibliography

Books

@mweibel
mweibel / passport-mock.js
Last active December 5, 2022 03:33
Mock passport.js with an own strategy
/**
* Author: Michael Weibel <michael.weibel@gmail.com>
* License: MIT
*/
var passport = require('passport')
, StrategyMock = require('./strategy-mock');
module.exports = function(app, options) {
// create your verify function on your own -- should do similar things as
@domenic
domenic / portable-node.md
Created May 25, 2012 21:03
Tips for Writing Portable Node.js Code

Node.js core does its best to treat every platform equally. Even if most Node developers use OS X day to day, some use Windows, and most everyone deploys to Linux or Solaris. So it's important to keep your code portable between platforms, whether you're writing a library or an application.

Predictably, most cross-platform issues come from Windows. Things just work differently there! But if you're careful, and follow some simple best practices, your code can run just as well on Windows systems.

Paths and URLs

On Windows, paths are constructed with backslashes instead of forward slashes. So if you do your directory manipulation

@asafge
asafge / ng-really.js
Created November 12, 2013 13:06
ng-really? An AngularJS directive that creates a confirmation dialog for an action.
/**
* A generic confirmation for risky actions.
* Usage: Add attributes: ng-really-message="Are you sure"? ng-really-click="takeAction()" function
*/
angular.module('app').directive('ngReallyClick', [function() {
return {
restrict: 'A',
link: function(scope, element, attrs) {
element.bind('click', function() {
var message = attrs.ngReallyMessage;
@rxaviers
rxaviers / output
Last active March 25, 2023 18:47
List of all JavaScript timezones (date.toString()) on linux node.js
/usr/share/zoneinfo/Hongkong
> Wed Jan 01 2014 00:00:00 GMT+0800 (HKT)
> Mon Sep 01 2014 00:00:00 GMT+0800 (HKT)
/usr/share/zoneinfo/Pacific/Easter
> Wed Jan 01 2014 00:00:00 GMT-0500 (EASST)
> Mon Sep 01 2014 00:00:00 GMT-0600 (EAST)
/usr/share/zoneinfo/Pacific/Norfolk
> Wed Jan 01 2014 00:00:00 GMT+1130 (NFT)