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
var selfNameTopOffset; | |
var navbarCollapsed; | |
$(function() { | |
. . . | |
normalNavBarHeight = $('#pnavbar').height(); | |
selfNameTopOffset = $("#selfName").offset().top; | |
$(window).on('resize', debounce(handleWindowResize, 50)); | |
handleWindowResize(); |
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 java.io.FileNotFoundException; | |
import java.io.InputStream; | |
import java.io.InputStreamReader; | |
import java.io.Reader; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.core.io.InputStreamResource; | |
import org.springframework.http.ResponseEntity; | |
import org.springframework.stereotype.Service; |
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
start taskmgr |
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
<input type="file" id="avatar" name="avatar" /> |
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
var oShell = new ActiveXObject("WScript.Shell"); | |
oShell.Run("cmd.exe /C start microsoft-edge:http://www.microsoft.com"); |
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 java.util.Collections; | |
public class RingBuffer<T> { | |
int length; | |
int currentPos = 0; | |
int firstPos = 0; | |
int lastPos; | |
private T[] buffer; |
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
<html> | |
Form being submitted | |
<!-- longresponse.phg will take 30 seconds to respons, in order to simulate a timeout --> | |
<form id="response" method="GET" action="https://oz-web.com/longresponse.php"> | |
<input type="hidden" name="status" id="status" value="*empty*" /> | |
</form> | |
<script> | |
const form = document.getElementById("response"); | |
function handleFail(){ | |
// replace this with whatever code you have to handle the timeout |
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
<html> | |
<a id="downloadBinaryLink"></a> | |
<script> | |
// file.php here serves as a pseudo API that returns a binary as octect stream (and according Access-Control-Allow-Origin header) | |
doBinaryDownload("http://oz-web.com/file.php", loadBinaryScriptEdit); | |
function loadBinaryScriptEdit(blob){ | |
var dataUri = window.URL.createObjectURL(blob); | |
var anchor = document.getElementById("downloadBinaryLink"); | |
anchor.setAttribute('href', dataUri); | |
anchor.setAttribute('download', "pingsender.exe"); |
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
equiv=$(curl $YOURURL -sS | grep -i "http-equiv") | |
shopt -s nocasematch | |
regexp='\<meta http-equiv=\"*refresh\"* content=\"*[0-9]*\"*;\s*url=([a-zA-Z0-9\/\.\?=#&.]*)' | |
path="" | |
if [[ $equiv =~ $regexp ]]; then | |
echo "${BASH_REMATCH[1]}" | |
# curl $YOURURL${BASH_REMATCH[1]} | |
else | |
echo "Could not parse equiv!" | |
exit 3 |
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
// Input: | |
// [ | |
// { | |
// "f00" : "bar", | |
// "info" : "this comma to my right is wrong", | |
// }, | |
// { | |
// "f00" : "bar", | |
// "info" : "the comma on the line below is wrong too!" | |
// }, |
NewerOlder