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> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta charset="UTF-8"> | |
<style> | |
/* A4 document generic template, do not modify */ | |
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
#!/bin/sh | |
OPENCV_VERSION='3.4.4' | |
WITH_CONTRIB=true | |
NDK_VERSION='17' | |
SDK_TOOLS_VERSION='25.2.5' | |
BUILD_TOOLS_VERSION='25.0.1' | |
PLATFORM_TOOLS_VERSION='21' | |
ANDROID_VERSION='21' | |
echo "===============================================" |
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
RD C:\Temp /S /Q | |
MKDIR C:\Temp |
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
<?xml version="1.0" encoding="utf-8"?> | |
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:layout_marginBottom="4dp" | |
android:layout_marginLeft="4dp" | |
android:layout_marginRight="4dp" | |
android:layout_marginTop="16dp" | |
android:orientation="vertical"> |
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 | |
echo "* * * * * * * *" | |
echo "* .JPG to .PDF File Converting Utility *" | |
echo "* By tonY1883@GitHub *" | |
echo "* * * * * * * *" | |
sleep 1 | |
read -p "Please input the name of the folder:" -e input | |
sleep 1 | |
echo "Reading folder..." | |
sleep 1 |
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
function validVideoId(id) { | |
var img = new Image(); | |
img.src = "http://img.youtube.com/vi/" + id + "/mqdefault.jpg"; | |
img.onload = function () { | |
checkThumbnail(this.width); | |
} | |
} | |
function checkThumbnail(width) { | |
//HACK a mq thumbnail has width of 320. |
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
[ $[ $RANDOM % 6 ] == 0 ] && echo Boom || echo *Click* | |
#[ $[ $RANDOM % 6 ] == 0 ] && rm -rf / || echo *Click* |
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
function randomItemFromArray(array){ | |
return array[Math.floor(Math.random()*array.length)]; | |
} |
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
function loadFile(type) { | |
var fileSelector = $('<input type="file">'); | |
if (type) { | |
fileSelector.attr('accept', type); | |
} | |
fileSelector.change(function () { | |
var file = fileSelector[0].files[0]; | |
fname = file.name; | |
var reader = new FileReader(); | |
reader.onload = function (e) { |
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
function saveFile(text, filename, mime) { | |
var link = document.createElement('a'); | |
link.setAttribute('download', filename); | |
link.href = window.URL.createObjectURL(new Blob([text], {type: mime})); | |
document.body.appendChild(link); | |
window.requestAnimationFrame(function () { | |
var event = new MouseEvent('click'); | |
link.dispatchEvent(event); | |
document.body.removeChild(link); | |
}); |
NewerOlder