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
| #!/usr/bin/env python2.7 | |
| from bs4 import BeautifulSoup as bs | |
| import base64 as b64 | |
| import urllib | |
| import os | |
| import re | |
| import unicodedata | |
| import inspect |
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
| #!/usr/bin/env python2.7 | |
| import subprocess as subp | |
| import tempfile | |
| import os,os.path | |
| import sys | |
| def ffgif(input, output, fps=None, start=None, end=None, resize=None,ffmpeg_args=[]): | |
| pipeyuvArgList = ['ffmpeg', '-loglevel', 'error', '-ss', start, '-i', input] |
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/bash | |
| ver=$(curl -s -L http://www.xnview.com/en/xnviewmp/|sed -n -E '/Version/{s/.*Version ([\.0-9]+).*/\1/;s/\.//;p;q;}') | |
| header='http://download.xnview.com/XnViewMP-' | |
| files=( | |
| win.exe | |
| win-x64.exe | |
| mac.tgz |
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
| powershell -noprofile -command "& {Param([string]$f);[Console]::OutputEncoding=[System.Text.Encoding]::UTF8;[Console]::WindowHeight=5;[Console]::BufferHeight=10;[Console]::WindowWidth=40;[Console]::BufferWidth=40;$fpath = Get-ChildItem $f;$subtitles=(ffprobe.exe -v 0 -show_streams -of json -i $fpath | ConvertFrom-Json).streams | Where-Object codec_type -eq """"subtitle""""; if ( $subtitles.GetType().BaseType.ToString() -eq """"System.Object"""") { if($subtitles.codec_name -eq """"ass"""") { $ext=""""ass"""" } else { $ext=""""srt"""" }; $stfile = """"{0}\{1}.{2}"""" -f $fpath.DirectoryName,$fpath.BaseName,$ext; Write-Output (""""{0}.{1}"""" -f $fpath.BaseName,$ext); ffmpeg.exe -v error -i $fpath -map 0:$($subtitles.index.ToString()) -y $stfile; } elseif ($subtitles.GetType().BaseType.ToString() -eq """"System.Array"""") { foreach ($subtitle in $subtitles) { if($subtitle.codec_name -eq """"ass""""){ $ext=""""ass"""" } else { $ext=""""srt"""" }; $name = $subtitle.tags.title; if($name -eq $null -or $name -eq ''){ |
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 main | |
| import ( | |
| "flag" | |
| "os" | |
| "path/filepath" | |
| "syscall" | |
| ) | |
| func main() { | |
| flag.Parse() | |
| ex, err := os.Executable() |
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
| String.prototype.replSubStr = function(startat, endat, replacement) { | |
| return this.substring(0, startat) + replacement + this.substring(endat+1); | |
| } | |
| String.prototype.interpolate = function() { | |
| var str = this.toString(); | |
| var dict = new Object(); | |
| if (arguments.length) { | |
| for(var k=0;k<arguments.length;k++) { | |
| if(typeof arguments[k] === "object") { |
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
| function shExpMatch(url, pat) { | |
| var pcharcode0; | |
| var ucharcode0; | |
| var pcharcode1; | |
| if (pat.length === 0) { | |
| if (url.length === 0) { | |
| return true; | |
| } else { |
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/bash | |
| # Baidu Yun Command Line Interface | |
| # Depends: bash, curl, grep, awk, sed, od | |
| # (They are basicly builtin tools of any *nix system.) | |
| # Additionally, fastupload depends: head, wc, md5sum or md5, cksum | |
| # (Which are also builtin tools) | |
| #### Variables #### |
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
| #!/usr/bin/env python | |
| import json, urllib2, sys, os | |
| from argparse import ArgumentParser | |
| parser = ArgumentParser() | |
| parser.add_argument('-c', '--cookie', help='use cookies', type=str, | |
| default='', metavar='COOKIES', dest='cookies') | |
| parser.add_argument('-o', '--output', help='output name', type=str, | |
| default='', metavar='NAME', dest='output') |
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
| addpath() { #{{{ | |
| local method path | |
| if (($#==0));then | |
| cat <<_EOF_ | |
| addpath [+|_|-] path [... pathN] | |
| + append path (default) | |
| - remove path | |
| _ prepend path | |
| _EOF_ |
NewerOlder