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
#!/usr/bin/env python | |
# | |
# Shows GOP structure of video file. Useful for checking suitability for HLS and DASH packaging. | |
# Example: | |
# | |
# $ iframe-probe.py myvideo.mp4 | |
# GOP: IPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP 60 CLOSED | |
# GOP: IPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP 60 CLOSED | |
# GOP: IPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP 60 CLOSED | |
# GOP: IPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPPP 60 CLOSED |
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 | |
# | |
# This is a rather minimal example Argbash potential | |
# Example taken from http://argbash.readthedocs.io/en/stable/example.html | |
# | |
# ARG_OPTIONAL_SINGLE([start],[s],[start time]) | |
# ARG_OPTIONAL_SINGLE([to],[t],[end time]) | |
# ARG_OPTIONAL_SINGLE([frame-rate],[r],[set frame rate (Hz value, fraction or abbreviation)],[10]) | |
# ARG_OPTIONAL_BOOLEAN([palette],[],[build custom palette],[on]) | |
# ARG_OPTIONAL_BOOLEAN([override],[y],[override output files without asking]) |
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 | |
function flac2alac { | |
filename=$(basename "$1" .flac) | |
dir=$(dirname "$1") | |
artformat="$(metaflac --export-picture-to=- "$1" | file --mime --brief - | awk '{split($1,arr,";"); print arr[1]}')" | |
artfile=".art.${filename}" | |
echo "Convert $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
// ==UserScript== | |
// @name THSR Ticket | |
// @namespace Violentmonkey Scripts | |
// @include https://irs.thsrc.com.tw/IMINT | |
// @include https://irs.thsrc.com.tw/IMINT/* | |
// @run-at document-idle | |
// @grant none | |
// @version 1.0 | |
// ==/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
class Queue { | |
constructor(limit, ...options) { | |
let timeout, delay; | |
if (options.length) { | |
if (typeof options[0] === 'object') { | |
({timeout, delay} = options[0]); | |
} | |
else { | |
[timeout, delay] = options; | |
} |
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
# -*- encoding: utf-8 -*- | |
from libpydhcpserver.dhcp import DHCPServer | |
class MyDhcpd(DHCPServer): | |
def _handleDHCPDecline(self, packet, source_address, port): | |
print 'Get Message, Type: {msgtype}, HW Address: {hwaddr}'.format( | |
msgtype=packet.getDHCPMessageTypeName(), | |
hwaddr=packet.getHardwareAddress() | |
) |
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
class Queue { | |
constructor(limit, timeout = 0) { | |
this.limit = limit; | |
this.timeout = timeout; | |
this.slot = []; | |
this.q = []; | |
} | |
queue(asyncFunc, name) { | |
let _self = this; |
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
$ cat ./test | |
#!/bin/bash | |
echo "a | |
b | |
3 | |
4 | |
-1 | |
-2 | |
c |
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
<?php | |
$user=$_GET["user"]; | |
$myname=$user; | |
?> | |
<html> | |
<body> | |
<div align="center"> | |
<span> | |
Welcome! This is SECURE PROGRAMMING Shopping Mall | |
</span> |
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
[].slice.call(document.querySelectorAll('.QTitle + td table td:nth-child(3) label'), 0).forEach(function (e) { e.click(); }); |
NewerOlder