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
# Centos 7.3 comes with 1.8.3 | |
# so update git from centos repo | |
yum update git | |
# it shows nothing to update | |
# we download git source and build and install latest git on Centos 7.3 |
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
/** | |
* Create the store with asynchronously loaded reducers | |
*/ | |
import { createStore, applyMiddleware, compose } from 'redux'; | |
import { fromJS } from 'immutable'; | |
import { routerMiddleware } from 'react-router-redux'; | |
import createSagaMiddleware from 'redux-saga'; | |
import { persistStore, autoRehydrate } from 'redux-persist-immutable'; | |
import createReducer from './reducers'; |
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
try { | |
const html = await template.render(req); | |
res.send(html); | |
} catch (err) { | |
console.error("Template rendering error: ", err); | |
res.send("Template error: ", err); | |
} | |
template | |
.render(req) |
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
const prettier = require("prettier"); | |
prettier.format(source, { | |
printWidth: 80, | |
tabWidth: 2, | |
singleQuote: false, | |
trailingComma: "none", | |
bracketSpacing: true, | |
jsxBracketSameLine: false, | |
parser: "babylon" |
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
# Editor configuration, see http://editorconfig.org | |
root = true | |
[*] | |
charset = utf-8 | |
indent_style = space | |
indent_size = 2 | |
insert_final_newline = true | |
trim_trailing_whitespace = true |
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
{ | |
"extends": [ | |
"@frontend/coinbase", | |
"prettier", | |
"prettier/react", | |
"prettier/flowtype" | |
], | |
"rules": { | |
"flowtype/type-id-match": [ | |
2, |
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
// 🔥 Node 7.6 has async/await! Here is a quick run down on how async/await works | |
const axios = require('axios'); // promised based requests - like fetch() | |
function getCoffee() { | |
return new Promise(resolve => { | |
setTimeout(() => resolve('☕'), 2000); // it takes 2 seconds to make coffee | |
}); | |
} |
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
<!-- basket ajax --> | |
<script type="text/javascript"> | |
/* | |
jQuery.ready(function($) { | |
jQuery("#basketForm_standalone").submit(function(e) { | |
var cart = jQuery('.Header .BasketBox'); | |
/* var cart2 = jQuery('.NavBarRoof .BasketBox'); | |
cart = cart2.height() ? cart2 : cart1; */ | |
var imgtodrag = jQuery('#ProductSlideshow img'); |
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
const express = require('express'); | |
const router = express.Router(); | |
const path = require('path'); | |
const chalk = require('chalk'); | |
const Git = require('nodegit'); | |
const walk = require('walk'); | |
const fs = require('fs'); | |
const rimraf = require('rimraf'); | |
const _ = require('lodash'); | |
const log = console.log; |
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
use strict; | |
use warnings; | |
use Getopt::Long; | |
use DE_EPAGES::Core::API::Script qw(RunScript); | |
use DE_EPAGES::Database::API::Connection qw(RunOnStore); | |
use DE_EPAGES::Object::API::Factory qw(LoadObject LoadObjectByPath ExistsObject ExistsObjectByGUID LoadRootObject LoadObjectByGUID ExistsObjectByPath LoadClassByAlias ); | |
use DE_EPAGES::Core::API::Error qw(ExistsError GetError); | |
use DE_EPAGES::Core::API::Log qw (GetLog LogDebug); | |
use DE_EPAGES::WebInterface::API::MessageCenter qw( SynchronizeCache ); |
NewerOlder