Skip to content

Instantly share code, notes, and snippets.

View talves's full-sized avatar
☠️
Coding

Tony Alves talves

☠️
Coding
View GitHub Profile
@talves
talves / SlideData.js
Created May 5, 2015 19:05
SlideShow SlideData fix
define(function(require, exports, module) {
var SlideData = {
picasaUrl: 'https://picasaweb.google.com/data/feed/api/all',
queryParams: '?kind=photo&q=puppy&max-results=5&imgmax=720&alt=json',
defaultImage: ''
};
SlideData.getUrl = function() {
return SlideData.picasaUrl + SlideData.queryParams;
};
@talves
talves / index.html
Created March 24, 2015 22:11
Blob vs FileUpload
<input type="file" id="fileInput" />
<div id="fileDisplayArea"></div>
@talves
talves / index.html
Created October 10, 2014 07:42
Famous App Famo.us Video with Attributes // source http://jsbin.com/botija/2
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Famo.us Video with Attributes" />
<meta charset="utf-8">
<title>Famous App</title>
<meta name="viewport" content="width=device-width, maximum-scale=1, user-scalable=no" />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black" />
var View = require('famous/core/View');
var Engine = require('famous/core/Engine');
var Modifier = require('famous/core/Modifier');
var Transform = require('famous/core/Transform');
var StateModifier = require('famous/modifiers/StateModifier');
var Easing = require('famous/transitions/Easing');
var Transitionable = require('famous/transitions/Transitionable');
var GenericSync = require('famous/inputs/GenericSync');
var Modifier = require('famous/core/Modifier');
var StateModifier = require('famous/modifiers/StateModifier');
__original_modify = Modifier.prototype.modify;
Modifier.prototype.modify = function extended_modify(target) {
__original_modify.call(this,target);
// here is the hack: set target to NULL if it should not be visible!
if(this._visibleGetter) this.visible = this._visibleGetter();
var Transform = require('famous/core/Transform');
function ShowModifier(options) {
this.visible = !!options.visible;
this._output = {
transform: Transform.identity,
opacity: 1,
origin: null,
align: null,
size: null,
@talves
talves / main.js
Last active August 29, 2015 14:01
/* globals define */
define(function(require, exports, module) {
'use strict';
// import dependencies
var Engine = require('famous/core/Engine');
var Surface = require('famous/core/Surface');
var HeaderFooterLayout = require('famous/views/HeaderFooterLayout');
var mainContext = Engine.createContext();
@talves
talves / README.md
Created April 26, 2014 14:47 — forked from ah8r/README.md

Cardiac Arrest

Hut3 Cardiac Arrest - A script to check OpenSSL servers for the Heartbleed bug (CVE-2014-0160).

Note: This code was originally a GitHub Gist but has been copied to a full GitHub Repository so issues can also be tracked. Both will be kept updated with the latest code revisions.

DISCLAIMER: There have been unconfirmed reports that this script can render HP iLO unresponsive. This script complies with the TLS specification, so responsitivity issues are likely the result of a bad implementation of TLS on the server side. CNS Hut3 and Adrian Hayter do not accept responsibility if this script crashes a server you test it against. USE IT AT YOUR OWN RISK. As always, the correct way to test for the vulnerability is to check the version of OpenSSL installed on the server in question. OpenSSL 1.0.1 through 1.0.1f are vulnerable.

This script has several advantages over similar scripts that have been re

Contract Killer

The popular open-source contract for web designers and developers by Stuff & Nonsense

  • Originally published: 23/12/2008
  • Revised date: 15/12/2013
  • Original post

@talves
talves / razor_recursion_kooboo.cshtml
Created January 16, 2014 07:19
Razor code for Multi Menu Recursion
<div class="container">
<ul class="main-Menu">
@foreach (var item in MenuHelper.Top())
{
@ShowTree(item);
}
</ul>
</div>
@helper ShowTree(Kooboo.CMS.Sites.Models.Page item) {