This file contains hidden or 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.bskyb.demo.janino; | |
import org.codehaus.commons.compiler.CompilerFactoryFactory; | |
import org.codehaus.commons.compiler.IExpressionEvaluator; | |
import java.util.Arrays; | |
import java.util.List; | |
public class Application { |
This file contains hidden or 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/sh | |
NEXUS_ENDPOINT="http://nexus.com" | |
GROUP="com.github.lukehackett" | |
ARTIFACT="demo-applciation" | |
VERSION="1.0.0-SNAPSHOT" | |
REPO="snapshots" | |
PACKAGING="jar" | |
curl --silent --location \ |
This file contains hidden or 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.example.tinyproxy; | |
import org.apache.http.HttpHost; | |
import org.apache.http.client.config.RequestConfig; | |
import org.apache.http.client.methods.CloseableHttpResponse; | |
import org.apache.http.client.methods.HttpGet; | |
import org.apache.http.conn.HttpHostConnectException; | |
import org.apache.http.impl.client.CloseableHttpClient; | |
import org.apache.http.impl.client.HttpClients; | |
import org.apache.http.util.EntityUtils; |
This file contains hidden or 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 {registerDecorator, ValidationOptions, ValidationArguments, Validator} from "class-validator"; | |
function IsBase64Image(mimeTypes: string[], validationOptions?: ValidationOptions) { | |
return function (object: Object, propertyName: string) { | |
registerDecorator({ | |
name: "IsBase64Image", | |
target: object.constructor, | |
propertyName: propertyName, | |
constraints: [mimeTypes], | |
options: validationOptions, |
This file contains hidden or 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 lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>React App</title> | |
<link rel="stylesheet" type="text/css" href="https://www.sky.com/assets/toolkit/v1.7.0/toolkit.css"> | |
<style type="text/css"> | |
.container { | |
margin-left: auto; |
This file contains hidden or 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
def require_user | |
unless current_user | |
store_location | |
flash[:danger] = "You must be logged in to access this page" | |
redirect_to login_path | |
return false | |
end | |
end | |
def require_no_user |