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.lang.Math.floor | |
import java.lang.Math.log10 | |
import java.util.stream.Stream | |
fun main(args: Array<String>) { | |
Stream.iterate(6, { it + 10 } ) | |
.filter { swapFirstAndLastDigit(it) == 4 * it } | |
.findFirst() | |
.map { println(it) } | |
} |
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
# Enable mouse | |
setw -g mode-mouse on | |
# Start windows and panes at 1, not 0 | |
set -g base-index 1 | |
set -g pane-base-index 1 | |
setw -g aggressive-resize on | |
setw -g mode-keys vi |
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 javax.servlet.Filter; | |
import javax.servlet.FilterChain; | |
import javax.servlet.FilterConfig; | |
import javax.servlet.ServletException; | |
import javax.servlet.ServletRequest; | |
import javax.servlet.ServletResponse; | |
import javax.servlet.http.HttpServletResponse; | |
import java.io.IOException; | |
import java.util.concurrent.Semaphore; |
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 org.mozilla.javascript.*; | |
import org.apache.commons.io.IOUtils; | |
import java.io.*; | |
public class HoganGenerator { | |
private StringBuilder parseFile(GeneratorContext context, String file) throws IOException { | |
StringBuilder javaScriptString = new StringBuilder(); | |
String variableName = String.format("template['%s']", file); |
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 | |
BRANCHES=$(git show -s --pretty=%d HEAD) | |
REVISION=$(git log --format=format:"%H %ci" -1) | |
echo "$REVISION $BRANCHES" |
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
// ==UserScript== | |
// @name NordInvasion AH price per item | |
// @namespace http://github.com/smat | |
// @version 0.1 | |
// @description Shows the price per item on the NordInvasion AH | |
// @match http://*.nordinvasion.com/* | |
// @match https://*.nordinvasion.com/* | |
// @grant none | |
// @copyright 2012+, Stian Mathissen | |
// ==/UserScript== |
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
server { | |
server_name localhost; | |
keepalive_timeout 5; | |
location /rest-api { | |
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
proxy_set_header Host $http_host; | |
proxy_redirect off; |
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
<html> | |
<head> | |
<title>Test</title> | |
<script type="text/javascript" src="http://fgnass.github.com/spin.js/dist/spin.min.js"></script> | |
<script type="text/javascript"> | |
function testbug() { | |
var target1 = document.getElementById('spin-here1'); | |
var spinner1 = new Spinner().spin(target1); |
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
# | |
# The following ignores... | |
# Miscellaneous Jenkins litter | |
*.log | |
*.tmp | |
*.old | |
*.bak | |
*.jar | |
*.json |
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 org.springframework.context.annotation.Scope; | |
import org.springframework.stereotype.Component; | |
@Component | |
@Scope("prototype") | |
public class MyBuilder { | |
public Object build() { | |
return new Object(); | |
} |
NewerOlder