Setup
bin/kafka-topics.sh \
--zookeeper zookeeper.example.com:2181 \
--create \
#!/bin/bash | |
# Sometimes you need to move your existing git repository | |
# to a new remote repository (/new remote origin). | |
# Here are a simple and quick steps that does exactly this. | |
# | |
# Let's assume we call "old repo" the repository you wish | |
# to move, and "new repo" the one you wish to move to. | |
# | |
### Step 1. Make sure you have a local copy of all "old repo" | |
### branches and tags. |
// ajax client | |
$(".download-selected-list").click( function() { | |
$.ajax( { | |
type: "post", | |
url:'http://localhost:3000/ajax-mongo/downloadImagesZip', | |
contentType: 'application/json', // to server | |
data: JSON.stringify({"arr":arrSelectedSrc}), | |
dataType: 'text', // from server | |
// dataType: 'binary', // from server |
var fileName = fPath.match(/[-_\w]+[.][\w]+$/i)[0]; | |
var fileName = fPath.split('/').pop(); |
var mongoose = require('mongoose'), | |
Schema = require('mongoose').Schema; | |
module.exports = (function() { | |
var defaultUrl = "mongodb://localhost:27017/test"; | |
var url = defaultUrl; | |
var schemaName = null; | |
var schemaDef = null; | |
var docuModel; |
var fs = require('fs'), | |
util = require('util'), | |
imgsize = require('image-size'); | |
module.exports = (function(){ | |
var supportExt = ["jpg", "jpeg", "png"]; // supported extension array | |
var dirPath = ""; // directory path | |
var fileList = []; // file name array | |
var fileInfo = [{}]; // array of file info object |
// prints text and waits one second | |
function doSomethingAsync(callback) { | |
console.log('doSomethingAsync: Wait for one second.'); | |
setTimeout(function() { callback(); }, 1000); | |
} | |
// prints text and waits half a second | |
function doSomethingElseAsync(callback) { | |
console.log('doSomethingElseAsync: Wait for half a sec.'); | |
setTimeout(function() { callback(); }, 500); |
$roundness: 20px 0 20px 0; | |
@mixin clearfix { | |
&:before, | |
&:after { | |
content: ''; | |
display: table; | |
} | |
&:after { | |
clear: both; |
'use strict'; | |
var gulp = require( 'gulp' ), | |
gutil = require( 'gulp-util' ), | |
fork = require( 'child_process' ).fork, | |
tinyLr = require( 'tiny-lr' ), | |
sass = require( 'gulp-ruby-sass' ), | |
sourcemaps = require('gulp-sourcemaps'), | |
async = require( 'async' ); |
// webserver 모듈은 public 아래의 contents 를 기준으로 | |
// gulp 기동과 동시에 webserver 및 explorer 까지 띄워준다. | |
// gulp-livereload 모듈은 sublime-text 의 LiveReload | |
// 플러그인을 Enable 시키는데 이 때 400 ms 의 delay 를 주면서 | |
// chrome 의 live reload extension 과 통신하여 refresh 하게 한다. | |
var gulp = require('gulp'), | |
// jshint = require('gulp-jshint'), | |
sass = require('gulp-ruby-sass'), |