Skip to content

Instantly share code, notes, and snippets.

João Neto joaoneto

Block or report user

Report or block joaoneto

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View startproject.sh
#!/usr/bin/env bash
mkdir -p ./app
echo '{
"name": "my-project",
"version": "0.0.0",
"scripts": {
"dev": "webpack-recipes devserver 9000",
"build": "webpack-recipes build --mode=production"
},
"devDependencies": {
View dynamicStates.js
(function() {
'use strict';
var dynamicStates = function ($stateProvider, $urlRouterProvider) {
var addRoute = function (name, definition) {
$stateProvider.state(name, definition);
};
$urlRouterProvider.deferIntercept();
View dynamic-states.json
{
"state-one": {
"controller": "stateOneController",
"template": "<h1>State One</h1>"
},
"state-two": {
"controller": "stateTwoController",
"template": "<h1>State Two</h1>"
}
}
View custom_events.js
(function () {
var _eventsStack = {};
window.Events = {
emit: function (eventName, message) {
if (!_eventsStack.hasOwnProperty(eventName)) {
_eventsStack[eventName] = [];
}
_eventsStack[eventName].forEach(function (fn) {
fn(message != undefined ? message : {});
});
@joaoneto
joaoneto / README.md
Last active May 23, 2016
Improve your curl with pretty formmated json responses
View README.md

Improve your curl with pretty formmated json responses

requirements node.js

add in your .zshrc

[[ -s $HOME/bin/prettycurl.sh ]] && . $HOME/bin/prettycurl.sh
View gist:b6818e65e55b378b3808
const React = require('react');
const ReactAtellier = require('react-atellier')(React);
class AtellierWrapper extends React.Component {
static propTypes = { message: React.PropTypes.string };
static defaultProps = { message: 'Hello World!' };
render() {
const Icon = React.createClass({
render: function() {
return (
@joaoneto
joaoneto / ATOM_PACKAGES.md
Last active Jan 18, 2016
Util Atom packages
View ATOM_PACKAGES.md

Atom Packages

apm instal \
aligner \
atom-beautify \
autoclose-html \
autocomplete-paths \
color-picker \
editorconfig \
file-icons \
@joaoneto
joaoneto / start_redis_and_couchdb.sh
Created Sep 3, 2015
Start Redis and CouchDB from Docker container
View start_redis_and_couchdb.sh
#!/bin/bash
docker-machine start default 1> /dev/null
eval "$(docker-machine env default)"
RUNNING=$(docker inspect --format="{{ .State.Running }}" redis 2> /dev/null)
if [ $? = 1 ]; then
echo "Container redis doesn\'t exists"
docker run -d -p 6379:6379 -v `pwd`/data/redis:/data --name redis redis
fi
@joaoneto
joaoneto / static.js
Created Apr 5, 2015
Try hoodie hooks :P
View static.js
var appName = require('./package.json').name
|| require('../../package.json').name;
var ports = require('ports');
var port = ports.getPort(appName + '-hoodie-plugin-social');
module.exports = {
// 'server.pack.post': function (pack) {
// console.log('hook: server.pack.pre called');
// },
View osx-for-hackers.sh
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
You can’t perform that action at this time.