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 / 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"));
!1::Numpad1
!2::Numpad2
!3::Numpad3
!4::Numpad4
!5::Numpad5
!6::Numpad6
!7::Numpad7
!8::Numpad8
!9::Numpad9
!0::Numpad0
# The Tuesday Child Puzzle!
# I have two children.
# One of them is a girl born on a Tuesday.
# What is the probability that I have two girls?
from enum import Enum
from random import randint
class Child():
@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",
/**
* Converts an input string to a fixed-width string.
*/
function stringToFixedLength(input) {
var output = "";
for (var i = 0; i < input.length; i++) {
/* Ignore newline characters */
if (input.charAt(i) == "\n") {
output = output + "<br />";
<?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,
.data
t1: .word 0
t0: .word 0
t3: .word 0
t2: .word 0
t5: .word 0
t4: .word 0
t7: .word 0
t6: .word 0
t9: .float 0.0