- no upfront installation/agents on remote/slave machines - ssh should be enough
- application components should use third-party software, e.g. HDFS, Spark's cluster, deployed separately
- configuration templating
- environment requires/asserts, i.e. we need a JVM in a given version before doing deployment
- deployment process run from Jenkins
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'; | |
const fs = require('fs'); | |
const co = require('co'); | |
const unzip = require('unzip'); | |
const promisePipe = require("promisepipe"); | |
/* | |
fs.createReadStream('t.zip') | |
.pipe(unzip.Extract({ path: 'output' }).on('close',function (){ | |
console.log('done'); |
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 webpack = require('webpack'); | |
module.exports = { | |
plugins: [ | |
// http://stackoverflow.com/questions/29080148/expose-jquery-to-real-window-object-with-webpack | |
new webpack.ProvidePlugin({ | |
// Automtically detect jQuery and $ as free var in modules | |
// and inject the jquery library | |
// This is required by many jquery plugins | |
jquery: "jquery", |
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
<Route path='dashboard' component={props => <MyComponent myProp='some-value' {...props} />} /> |
I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6
apt-get update && apt-get install gdb
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 asyncio | |
import json | |
import logging | |
import aiohttp | |
from aiohttp import HttpProcessingError, ClientSession | |
# setting up logger | |
logger = logging.getLogger(__name__) | |
logger.setLevel(logging.DEBUG) |
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 controllers | |
import ( | |
"fmt" | |
"log" | |
"os" | |
xmlpath "gopkg.in/xmlpath.v1" | |
_ "github.com/go-sql-driver/mysql" |
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'; | |
var vm = require('vm') | |
exports.getData = function* (id) { | |
this.query.id; | |
global.self = this; | |
var result = [] | |
let raw = `foo = function*(){ \ | |
let apiResult = yield self.app.urllib.requestThunk(self.app.config.dataServiceUrl + '/data/zhima/1'); \ | |
return JSON.parse(apiResult.data); \ |
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
buff := make([]byte, 1024) | |
c := bufio.NewReader(conn) | |
for { | |
// read a single byte which contains the message length | |
size, err := c.ReadByte() | |
if err != nil { | |
return err | |
} |
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 main | |
import ( | |
"fmt" | |
"net" | |
"time" | |
"bufio" | |
) | |
func handleConnection(conn net.Conn) { |