Skip to content

Instantly share code, notes, and snippets.

View grabbou's full-sized avatar
💭
🇦🇪🇺🇸

Mike grabbou

💭
🇦🇪🇺🇸
View GitHub Profile
@grabbou
grabbou / tasks.json
Last active June 30, 2023 13:29
A simple example of launching two long-running processes within Visual Studio Code to make working in monorepo easier
{
"version": "2.0.0",
"tasks": [
{
"label": "Start Expo dev server",
"type": "shell",
"command": "cd ./apps/mobile && yarn start",
"presentation": {
"reveal": "always",
"panel": "new",
@grabbou
grabbou / .travis.yml
Created August 19, 2014 08:27
Code coverage integration for CodeClimate / TravisCI & Mocha
language: node_js
node_js: ["0.11", "0.10"]
env:
CODECLIMATE_REPO_TOKEN: <your_token>
before_script:
- npm install -g istanbul
- npm install -g mocha
- npm install -g codeclimate-test-reporter

Useful VSCode shortcuts

  • Navigate to a symbol in a file - ⌘O (add ":" to group by type)
  • Navigate to a symbol in a project - ⌘T (#)
  • Select line - ⌘I
  • Zen Mode - ⌘K+Z
  • Hide sidebar - ⌘B
  • Open markdown preview - ⌘K+V
  • Go to source file - ⌘ Click
  • Toggle terminal - ⌃`
@grabbou
grabbou / b.json
Last active September 4, 2017 13:23
[
{
"id": "59ad53cc251fe8ea313e877a",
"city": "Rivereno",
"image": "http://fanaru.com/images/club/trivia/t48.png"
},
{
"id": "59ad53ccb8f153a21165386e",
"city": "Bangor",
"image": "http://fanaru.com/images/club/trivia/t48.png"
@grabbou
grabbou / webpack.haul.js
Created March 31, 2017 13:18
Haul config for getting Typescript running
/**
* This is Webpack config you need in order to get
* Typescript up and running
*/
module.exports = ({ platform }, { module }) => ({
// We have two files, index.ios.tsx and index.android.tsx
entry: `./index.${platform}.tsx`,
// We extend default loaders by prepending `ts-loader`
module: {
...module,
@grabbou
grabbou / gist:ead3e217a5e445929f14
Last active March 24, 2017 02:13
How to use ES6 generators with Hapi.js <3
import co from 'co'
// Generator controller,
// this.models refers to Sequelize models added with server.bind()
function* loginController(request) {
let user = yield this.models.User.find({
where: {
email: request.payload.email
}
@grabbou
grabbou / gist:ab4981fc7c10ba2b31de
Last active January 16, 2017 15:21
TrackKeyboard
import KeyboardEvents from 'react-native-keyboardevents';
import {
Emitter as KeyboardEventEmitter
} from 'react-native-keyboardevents';
export default {
getInitialState() {
return {
keyboardSpace: 0,
@grabbou
grabbou / test.m
Last active April 29, 2016 12:03
/**
* Copyright (c) 2015-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under the BSD-style license found in the
* LICENSE file in the root directory of this source tree. An additional grant
* of patent rights can be found in the PATENTS file in the same directory.
*/
#import "RCTRootView.h"
import PureComponent from 'react-pure-render/mixin';
import React from 'react-native';
import {
View,
Text
} from 'react-native';
import TrackKeyboard from '../components/trackKeyboard.react';
import LoginForm from '../auth/loginForm.react';
import style from './register.style.js';
import onlyUpdateForKeys from 'onlyUpdateForKeys';
const onlyUpdateForProps = (BaseComponent) => {
const propKeys = Object.keys(BaseComponent.propTypes || {});
return onlyUpdateForKeys(propKeys, BaseComponent);
};
export default onlyUpdateForProps;