Skip to content

Instantly share code, notes, and snippets.

View OzuYatamutsu's full-sized avatar
😺
Myeh!!

Sean Collins OzuYatamutsu

😺
Myeh!!
View GitHub Profile
@OzuYatamutsu
OzuYatamutsu / x
Created May 4, 2011 13:20 — forked from Schnubby/x
Ubiquity: Google Images search including search for colors
noun_type_color = new CmdUtils.NounType( "Color",
["red", "orange", "yellow", "green", "blue", "black", "white", "grey", "brown", "purple", "magenta", "indigo", "pink"] );
CmdUtils.CreateCommand({
name: "google-images",
synonyms: ["pic", "image", "color"],
takes: {search: noun_arb_text},
modifiers: {in: noun_type_color},
author: {name: "Christian Roth", email: "schnubby@traces-of-nuts.eu"},
icon: "http://www.google.com/favicon.ico",
@OzuYatamutsu
OzuYatamutsu / simple_ios_config.tcl
Created May 12, 2014 22:18
A simple base Cisco IOS configuration to build on top of.
enable
configure terminal
enable secret cisco
service password-encryption
no ip domain-lookup
line con 0
exec-timeout 0 0
password cisco
login
logging syn
@OzuYatamutsu
OzuYatamutsu / stk_engine::html5-fullscr-vidpage.php
Created September 12, 2014 16:24
Work-in-progress script for generating full, flashless HTML5 video pages
<?php
require('stdTitleMetaPopulate.php');
require('vidclick-repeater.js');
require('html5-vidrepeat.html');
require('html5-fullscr-vid.css');
define("VID_TYPES", array(
"mp4"=>"video/mp4",
"ogv"=>"video/ogv",
"webm"=>"video/webm"));
private class DownloadFilesTask extends AsyncTask<URL, Integer, Long> {
protected Long doInBackground(URL... urls) {
int count = urls.length;
long totalSize = 0;
for (int i = 0; i < count; i++) {
totalSize += Downloader.downloadFile(urls[i]);
publishProgress((int) ((i / (float) count) * 100));
// Escape early if cancel() is called
if (isCancelled()) break;
}
public async Task<int> ExampleMethodAsync()
{
var httpClient = new HttpClient();
int exampleInt = (await httpClient.GetStringAsync("http://msdn.microsoft.com")).Length;
ResultsTextBox.Text += "Preparing to finish ExampleMethodAsync.\n";
return exampleInt;
}
!1::Numpad1
!2::Numpad2
!3::Numpad3
!4::Numpad4
!5::Numpad5
!6::Numpad6
!7::Numpad7
!8::Numpad8
!9::Numpad9
!0::Numpad0
expr
: (boolExpr) => boolExpr
| (numExpr) => numExpr
| LPAREN! expr RPAREN!
;
boolExpr
: (constval binop_p0) => constval binop_p0 expr
-> ^(binop_p0 constval expr)
| (value binop_p0) => value binop_p0 expr
<?php
if (in_array($typeResponse, $ALLOWED_FILETYPES) && intval($lengthResponse) <= $MAX_FILESIZE) {
$filename = substr($_POST['picURL'], strrpos($_POST['picURL'], '/') + 1);
$filename = (strstr($filename, '?') ? substr($filename, 0, strpos($filename, '?')) : $filename);
shell_exec('cd /var/www/testing/imgresize/img_upload/ && wget --cookies=on -p "' . $_POST['picURL'] . '" -O ' . $filename);
} else {
echo 'Filesize too large, or file type not allowed.';
}
?>
Type:int| Scope:GLOBAL_SCOPE| Backing Type: INT
Type:fixedpt| Scope:GLOBAL_SCOPE| Backing Type: FIXEDPT
Function:print| Return Type: void| Scope:GLOBAL_SCOPE| # of Parameters: 1
Function:getchar| Return Type:string| Scope:GLOBAL_SCOPE| # of Parameters: 0
Function:ord| Return Type:int| Scope:GLOBAL_SCOPE| # of Parameters: 1
Function:size| Return Type:int| Scope:GLOBAL_SCOPE| # of Parameters: 1
Function:substring| Return Type:string| Scope:GLOBAL_SCOPE| # of Parameters: 3
Function:concat| Return Type:string| Scope:GLOBAL_SCOPE| # of Parameters: 2
Function:chr| Return Type:string| Scope:GLOBAL_SCOPE| # of Parameters: 1
Function:printi| Return Type: void| Scope:GLOBAL_SCOPE| # of Parameters: 1
func1:
assign, t1, 0,
assign, t0, t1,
return, t0, ,
assign, t3, 0,
assign, t2, t3,
return, t2, ,
func2:
assign, t5, 0,
assign, t4, t5,