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 { JSDOM } = require("jsdom"); | |
const semver = require("semver"); | |
const Listr = require("listr"); | |
const { Observable } = require("rxjs"); | |
const http = require("https"); | |
const fs = require("fs"); | |
function fetchPluginInfo(plugin) { | |
return JSDOM.fromURL( | |
`https://marketplace.visualstudio.com/items?itemName=${plugin}` |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jasmine/2.3.4/jasmine.min.css"> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/jasmine/2.3.4/jasmine.min.js"></script> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/jasmine/2.3.4/jasmine-html.min.js"></script> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/jasmine/2.3.4/boot.min.js"></script> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>Promise.inSequence</title> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script src="https://npmcdn.com/@reactivex/[email protected]/dist/global/Rx.KitchenSink.umd.js"></script> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jasmine/2.3.4/jasmine.min.css"> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/jasmine/2.3.4/jasmine.min.js"></script> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/jasmine/2.3.4/jasmine-html.min.js"></script> | |
<script src="http://cdnjs.cloudflare.com/ajax/libs/jasmine/2.3.4/boot.min.js"></script> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> |
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
/*eslint-env jasmine*/ | |
import Rx from 'rxjs'; | |
fdescribe('TestScheduler', () => { | |
describe('createHotObservable()', () => { | |
it('should create a hot observable emmiting the values given as marble strings', () => { | |
//given | |
const scheduler = new Rx.TestScheduler(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
#!/bin/bash | |
# Run the following command in the root of your project to install this pre-push hook: | |
# cp git-hooks/pre-push .git/hooks/pre-push; chmod 700 .git/hooks/pre-push | |
if [ -z "$BRANCHES_TO_SKIP" ]; then | |
BRANCHES_TO_SKIP=(master develop test) | |
fi | |
BRANCH_NAME=$(git symbolic-ref --short HEAD) | |
BRANCH_NAME="${BRANCH_NAME##*/}" |
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
app.use((req: express.Request, resp: express.Response, next?: Function) => { | |
var render = resp.render; | |
resp.render = (view: string, options?: any, fn?: any) => { | |
if ('function' == typeof options) { | |
fn = options; | |
options = {}; | |
} | |
render.call(resp, view, options, (err, html) => { | |
if (html) { |
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
public class GrizzlyWebServer { | |
private static final Logger logger = LoggerFactory.getLogger(GrizzlyWebServerService.class); | |
public static final void main(String[] args) throws IllegalArgumentException, IOException { | |
HttpServer server = startWebServer(); | |
System.out.println("Jersey started"); | |
if (logger.isInfoEnabled()) { | |
logger.info("Jersey web app started with Grizzly web container"); | |
} |
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
public class BetterJerseyTest extends JerseyTest { | |
//Fire up jersey with Guice | |
private static final AppDescriptor APP_DESCRIPTOR = new WebAppDescriptor.Builder("com.some.package.name") | |
.filterClass(GuiceFilter.class) | |
.contextPath("jersey-ctx-path") | |
.servletPath("/") | |
.clientConfig(new DefaultClientConfig(JacksonJaxbJsonProvider.class)) | |
.build(); |
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 java.io.CharArrayWriter; | |
import java.io.IOException; | |
import java.io.PrintWriter; | |
import javax.servlet.http.HttpServletResponse; | |
import javax.servlet.http.HttpServletResponseWrapper; | |
public class CharArrayWriterResponse extends HttpServletResponseWrapper { | |
private final CharArrayWriter charArray = new CharArrayWriter(); |
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
public class HttpServletRequestDecoratorFilter implements Filter { | |
@Override | |
public void init(FilterConfig filterConfig) throws ServletException { | |
//do nothing | |
} | |
@Override | |
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { | |
request = decorate(request); |
NewerOlder