Skip to content

Instantly share code, notes, and snippets.

View brunokrebs's full-sized avatar

Bruno Krebs brunokrebs

View GitHub Profile
var telnet = require('telnet-client');
var connection = new telnet();
var params = {
host: '200.192.176.65',
port: 80,
shellPrompt: '/ # ',
timeout: 2000
// removeEcho: 4
};
gulp.task('watch', function() {
gulp.watch(['./src/**/*'], ['minify', 'uglify', 'copy-images']);
});
gulp.task('webserver', function() {
webserverInstance = gulp.src('./dev').pipe(webserver({ host: '0.0.0.0', port: 8000 }));
});
var gulp = require('gulp');
var concat = require('gulp-concat');
gulp.task('concat-js', function() {
return gulp.src([
'./src/js/wysiwyg.js',
'./src/js/**/!(wysiwyg)*.js'
])
.pipe(concat('wysiwyg.js'))
.pipe(gulp.dest('./dist'));
var gulp = require('gulp');
var uglify = require('gulp-uglify');
var rename = require('gulp-rename');
// concat-js definition ...
gulp.task('uglify', ['concat-js'], function() {
return gulp.src('./dist/wysiwyg.js')
.pipe(uglify())
.pipe(rename(function (path) {
var gulp = require('gulp');
var webserver = require('gulp-webserver');
// concat-js definition ...
// uglify definition ...
gulp.task('watch', function() {
gulp.watch(['./src/**/*'], ['uglify']);
});
<html>
<body ng-app="testing-app">
<!-- our component main directive -->
<wysiwyg-edit content="testing-variable"></wysiwyg-edit>
<!-- angular files -->
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.17/angular.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.17/angular-sanitize.min.js"></script>
<!-- our concatenated, minified and uglified component -->
<script src="wysiwyg.min.js"></script>
</body>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.3.3.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
package hello;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
@EnableAutoConfiguration
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>br.com.brunokrebs</groupId>
<artifactId>abtbv</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>abtbv</name>
package br.com.brunokrebs;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class AbtbvApplication {
public static void main(String[] args) {
SpringApplication.run(AbtbvApplication.class, args);