This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( function() { | |
var myLoader = require.config( { | |
baseUrl: '/js' | |
// any other settings here. | |
}); | |
myLoader( [ 'list', 'of', 'deps' ], function( dep1, dep2, dep3 ) { | |
/* do stuff here */ | |
}); | |
}()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* st/filemanager.js | |
* FileManager | |
* | |
* Dependencies: | |
* - jQuery | |
* - StoryTroop (st/storytroop) | |
* - StoryTroop.ui (st/ui) | |
* - Mustache (lib/mustache-wp) | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package feriado | |
import ( | |
"fmt" | |
"github.com/go-chat-bot/bot" | |
"github.com/go-chat-bot/plugins/web" | |
"time" | |
) | |
const ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]); | |
} |