#Addon SDK usage
##Add widget to addon bar
require('sdk/widget').Widget({
id: '...',
label: '...', //context label
content: '...', //text label
width: 100,
onClick: function() {
"use strict"; | |
//JNI.jsm introduced requires Firefox for Android 34 | |
const { classes: Cc, interfaces: Ci, utils: Cu } = Components; | |
Cu.import("resource://gre/modules/Services.jsm"); | |
Cu.import("resource://gre/modules/XPCOMUtils.jsm"); | |
XPCOMUtils.defineLazyGetter(this, "JNI", function() { | |
let scope = {}; |
livestreamer -a "- --sout '#http{{mux=ffmpeg{{mux=flv}},dst=:8080/toon}}'" vaughnlive.tv/toonamiest best |
#Addon SDK usage
##Add widget to addon bar
require('sdk/widget').Widget({
id: '...',
label: '...', //context label
content: '...', //text label
width: 100,
onClick: function() {
1. Note that the files will be deleted from the file system as well as from the history, so make a backup of the repository before preceeding and any files that you want then leave untracked in the repository | |
2. Get a list of tracked files in a tree and save to file (do for each branch) | |
git ls-tree --full-tree --name-only -r HEAD >> files.txt | |
3. Review the list of files and remove the files that you want to keep. This is also a good time to edit your .gitignore file so that the files remain untracked if they are added again. | |
4. Get a list of deleted files in a repository and add the unwanted files to the list of files | |
git log --diff-filter=D --summary |
#!perl | |
use v5.16; | |
use warnings; | |
use Subtitles::SRT::File; | |
use HTML::Entities; | |
use XML::Simple; | |
my $srt=Subtitles::SRT::File->new; | |
my $xml=XMLin shift; |
FOR /F "tokens=*" %%G IN ('DIR /B /AD /S *.svn*') DO RMDIR /S /Q "%%G" |
Perl | |
+----------------------------------------------------------------+ | |
| Determine memory load | | |
|----------------------------------------------------------------| | |
| use Win32::SystemInfo; | | |
| my %status; | | |
| Win32::SystemInfo::MemoryStatus(%status); | | |
| if($status{'MemLoad'} > 90) { | | |
| … | | |
| } | |
import re, urllib, xbmcgui | |
f = urllib.urlopen("http://admin:[email protected]/status.htm") | |
data=f.read() | |
f.close() | |
try: | |
strength=re.search('<td width="10%">(\d+%)<\/td>',data).group(1) | |
dialog = xbmcgui.Dialog() | |
ok = dialog.ok('Signal Strength', 'Signal Strength: %s'%strength) | |
except AttributeError: |
<!DOCTYPE html> | |
<html> | |
<head> | |
<script> | |
(function(a,b){function cg(a){return d.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cd(a){if(!bZ[a]){var b=d("<"+a+">").appendTo("body"),c=b.css("display");b.remove();if(c==="none"||c==="")c="block";bZ[a]=c}return bZ[a]}function cc(a,b){var c={};d.each(cb.concat.apply([],cb.slice(0,b)),function(){c[this]=a});return c}function bY(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function bX(){try{return new a.XMLHttpRequest}catch(b){}}function bW(){d(a).unload(function(){for(var a in bU)bU[a](0,1)})}function bQ(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var e=a.dataTypes,f={},g,h,i=e.length,j,k=e[0],l,m,n,o,p;for(g=1;g<i;g++){if(g===1)for(h in a.converters)typeof h==="string"&&(f[h.toLowerCase()]=a.converters[h]);l=k,k=e[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=f[m]||f["* "+k];if(!n){p=b;for(o in f){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=f[j[1]+" "+k];if(p){o=f[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&d.e |
Sub rubier() | |
Dim pattern As String | |
Dim text As String | |
Dim parts() As String | |
Dim kana As String | |
Dim kanji As String | |
'pattern = [U+4E00-U+9FFF]{1,}U+12298?*U+12299 | |
'pattern = \p{InCJK_Unified_Ideographs}{1,}\N{left double angle bracket}?*\N{right double angle bracket} | |
pattern = "[" & ChrW(19968) & "-" & ChrW(40959) & "]{1,}" & ChrW(12298) & "?*" & ChrW(12299) |