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
client | |
.refresh() | |
.then(function () { | |
return client.get(); // return your promise | |
}) | |
.then(function (result) { | |
// result is the return of client.get() | |
}) | |
.catch(function (err) { | |
// common handler for any broken promise now |
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
defmodule MyModule do | |
defmacro exec_with(left, right, do: fun) do | |
quote do | |
case unquote(right) do | |
unquote(left) -> | |
unquote(fun) | |
v -> v | |
end | |
end | |
end |
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
module.exports = { | |
image: 'elasticsearch', | |
binds: [ | |
'$DOCKSERV_DATA/elasticsearch/data:/usr/share/elasticsearch/data' | |
], | |
ports: [ | |
'9200', | |
'9300' | |
] | |
}; |
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
exports.parse = function parse(mdown) { | |
console.log('<p align="center" style="margin: 2em auto auto auto; width:70%;">'); | |
mdown.match(/\[\!.*?\)\].*?\)/g).forEach(function (badge) { | |
var segments = badge.match(/\[!\[(.*?)\]\((.*?)\)\]\((.*?)\)/); | |
var altText = segments[1]; | |
var svgPath = segments[2]; | |
var urlHref = segments[3]; | |
console.log(` <a href="${urlHref}">`); |
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 com.zackehh.example; | |
import java.net.URI; | |
import org.apache.http.client.methods.HttpGet; | |
import org.apache.http.impl.client.DefaultHttpClient; | |
import org.apache.http.params.BasicHttpParams; | |
import org.apache.http.params.HttpConnectionParams; | |
import org.apache.http.params.HttpParams; |
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
#include <conio.h> // For C stuff | |
#include <ctime> // For the current time | |
#include <fstream> // Needed for the file stream | |
#include <iostream> // Needed for input and output | |
#include <winsock2.h> // Needed for socket connection | |
using namespace std; | |
#define SERVER_PORT 12345 // Server port to connect on | |
#define BUF_SIZE 4096 // Block transfer size |
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 fs = require('fs'), | |
Mocha = require("mocha"), | |
path = require('path'); | |
// Our Mocha runner | |
var mocha = new Mocha({ | |
ui:"bdd", | |
reporter:"spec", | |
timeout:60000, | |
slow:10000 |
NewerOlder