Skip to content

Instantly share code, notes, and snippets.

View zrod's full-sized avatar
💻
Refactoring https://donating.io

Rodrigo zrod

💻
Refactoring https://donating.io
View GitHub Profile
@zrod
zrod / main.js
Created July 18, 2012 01:18 — forked from fivetanley/main.js
requirejs configuration example
( function() {
var myLoader = require.config( {
baseUrl: '/js'
// any other settings here.
});
myLoader( [ 'list', 'of', 'deps' ], function( dep1, dep2, dep3 ) {
/* do stuff here */
});
}())
@zrod
zrod / uri.js
Created October 16, 2012 02:29 — forked from jlong/uri.js
URI Parsing with Javascript
var parser = document.createElement('a');
parser.href = "http://example.com:3000/pathname/?search=test#hash";
parser.protocol; // => "http:"
parser.hostname; // => "example.com"
parser.port; // => "3000"
parser.pathname; // => "/pathname/"
parser.search; // => "?search=test"
parser.hash; // => "#hash"
parser.host; // => "example.com:3000"
/**
* st/filemanager.js
* FileManager
*
* Dependencies:
* - jQuery
* - StoryTroop (st/storytroop)
* - StoryTroop.ui (st/ui)
* - Mustache (lib/mustache-wp)
*/
# mongod.conf
# for documentation of all options, see:
# http://docs.mongodb.org/manual/reference/configuration-options/
# Where and how to store data.
storage:
dbPath: "/var/lib/mongodb"
engine: "wiredTiger"
wiredTiger:
@zrod
zrod / git-credentials-cache
Last active December 15, 2015 01:19
Git credentials
(1.7.9+)
Stores password in cache for 15 minutes (default):
git config --global credential.helper cache
Define custom timeout:
git config credential.helper 'cache --timeout=3600'
OS Keystore:
git config --global credential.helper osxkeychain
<?php
/**
* SplClassLoader implementation that implements the technical interoperability
* standards for PHP 5.3 namespaces and class names.
*
* http://groups.google.com/group/php-standards/web/final-proposal
*
* // Example which loads classes for the Doctrine Common package in the
* // Doctrine\Common namespace.
var React = require('react'),
ReactDOM = require('react-dom');
class UserLocation extends React.Component {
constructor(props, geoWatchId, lat, lng) {
super(props);
// Internal vars
this.geoWatchId = geoWatchId ? geoWatchId : null;
this.lat = lat ? lat : null;
package feriado
import (
"fmt"
"github.com/go-chat-bot/bot"
"github.com/go-chat-bot/plugins/web"
"time"
)
const (
import React, {PropTypes} from 'react';
import {Form} from 'semantic-ui-react';
import I18n from '../../helpers/I18n';
const AdForm = ({ad, onChange}) => {
return (
<Form>
<h1>{i18n.ad.new}</h1>
<Form.Input
import React, { PropTypes } from 'react';
import { Message } from 'semantic-ui-react';
import I18n from '../../helpers/I18n';
const ErrorBlock = ({errors}) => {
let errorList = [];
for (let error in errors) {
errorList.push(errors[error]);
}