Skip to content

Instantly share code, notes, and snippets.

View helloncanella's full-sized avatar

Hellon Canella helloncanella

  • Peats GmbH
  • Rio de Janeiro
View GitHub Profile
import { NetworkStatus, isNetworkRequestInFlight } from 'apollo-client/core/networkStatus';
type isNetworkTransitionArg = {
networkStatus: NetworkStatus;
};
export enum NetworkTransition {
LOADED_DATA,
WAS_IN_CACHE,
LOADING,
@6uimorais
6uimorais / _Self-Hosted-Kadira-APM-Docker-Compose -Ubuntu.md
Last active January 29, 2022 16:34
Self Hosted Kadira APM - Docker Compose - Ubuntu

1 - Get an Ubuntu machine up and running (make sure ports 11011 and 4000 are open)

2 - Install docker + docker-compose (full_install_docker_compose.sh)

3 - Get a docker-compose.yml with mongodb, kadira-ui, kadira-engine and kadira-rma (docker-compose.yml)

3 - Run "sudo docker-compose up" (-d if you want it running on background)

4 - Access http://machineIp:4000 and login as "admin@gmail.com" and "admin" password

5 - Create your APP, get the ID and Secret

6 - Setup kadira in your app by code or settings.json (Config)

7 - Update your app from "free" plan to "paid" to get full access at Kadira ([Update App Plan](https://gist.github.com/6uimorais/1e1de20bbbb2a04fe19fc73f88d6a25f#file-changepl

@helloncanella
helloncanella / tny
Last active September 13, 2015 03:28 — forked from gbl08ma/tny
Unix shell script to shorten URLs with tny.im URL shortener. wget must be installed for this to work.
#!/bin/sh
if [ -t 0 ]; then
if [ -z "$1" ]; then
echo "usage: tny long_url [custom_keyword]"
echo ""
echo "Shorten URLs with tny.im URL shortener"
echo "This script expects a long URL to shorten either as an argument or passed through STDIN."
echo "When using arguments, an optional second argument can be provided to customize the later part of the short URL (keyword)."
exit 1
fi
@yoavniran
yoavniran / ultimate-ut-cheat-sheet.md
Last active April 13, 2024 16:19
The Ultimate Unit Testing Cheat-sheet For Mocha, Chai, Sinon, and Jest
@mejarc
mejarc / .jshintrc
Last active January 27, 2016 21:55
template-jshintrc
// based on jQuery Core & Elijah Manor (http://www.elijahmanor.com/control-the-complexity-of-your-javascript-functions-with-jshint/)
{
"globals": {
"console": false,
"jQuery": false,
"_": false
},
"maxparams": 5,
"maxdepth": 5,
"maxstatements": 25,
@danharper
danharper / gulpfile.js
Last active April 11, 2024 08:31
New ES6 project with Babel, Browserify & Gulp
var gulp = require('gulp');
var sourcemaps = require('gulp-sourcemaps');
var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var browserify = require('browserify');
var watchify = require('watchify');
var babel = require('babelify');
function compile(watch) {
var bundler = watchify(browserify('./src/index.js', { debug: true }).transform(babel));
@pburtchaell
pburtchaell / styles.css
Last active February 25, 2024 12:24
VH and VW units can cause issues on iOS devices. To overcome this, create media queries that target the width, height, and orientation of iOS devices.
/**
* VH and VW units can cause issues on iOS devices: http://caniuse.com/#feat=viewport-units
*
* To overcome this, create media queries that target the width, height, and orientation of iOS devices.
* It isn't optimal, but there is really no other way to solve the problem. In this example, I am fixing
* the height of element `.foo` —which is a full width and height cover image.
*
* iOS Resolution Quick Reference: http://www.iosres.com/
*/
@kevinSuttle
kevinSuttle / app.js
Last active February 26, 2024 07:02
Gulp, BrowserSync, Sass, Autoprefixer, Nodemon
var express = require('express');
var app = express();
var router = express.Router();
var hbs = require('hbs');
app.set('view engine', 'html');
app.engine('html', hbs.__express);
app.use(express.json());
app.use(express.urlencoded());
@banaslee
banaslee / XGH - en.txt
Last active April 19, 2024 20:39
eXtreme Go-Horse Process
eXtreme Go Horse (XGH) Process
Source: http://gohorseprocess.wordpress.com
1. I think therefore it's not XGH.
In XGH you don't think, you do the first thing that comes to your mind. There's not a second option as the first one is faster.
2. There are 3 ways of solving a problem: the right way, the wrong way and the XGH way which is exactly like the wrong one but faster.
XGH is faster than any development process you know (see Axiom 14).
@markdurrant
markdurrant / _fluid-grid-generator-mixin.scss
Created August 13, 2012 16:10
Sass fluid grid generator mixin based on Twitter Bootstrap fluid grid.
// =======================================================================
// Fluid Grid Generator Mixin
// +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
//
// Based on fluid grid from http://twitter.github.com/bootstrap/
// =======================================================================
//
//
// Parameters
// =======================================================================