Skip to content

Instantly share code, notes, and snippets.

View maggiben's full-sized avatar

Benjamin maggiben

  • Salesforce
  • Argentina
View GitHub Profile
@maggiben
maggiben / linux.js
Last active October 14, 2022 05:29
Read the contents of /proc/stats and print the % of cpu utilization (tested on ubuntu) (go to http://www.linuxhowtos.org/System/procstat.htm to find what the meaning of each field in that file is)
var fs = require('fs');
// An object to store our data
var stat = {
cpu: {
user: 0,
nice: 0,
system: 0,
idle: 0,
iowait: 0,
@maggiben
maggiben / index.html
Created July 27, 2013 03:43
A CodePen by Benjamin. FansWorld Editable Menu - Feature #380: https://github.com/FansWorldTV/web/issues/380
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script>
<link href="http://fansworld.svn.dodici.com.ar/bundles/dodicifansworldweb/css/base.css" rel="stylesheet">
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>
<link href='https://raw.github.com/daneden/animate.css/master/animate.css' rel='stylesheet' type='text/css'>
<script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/js/bootstrap.min.js"></script>
</head>
@maggiben
maggiben / index.html
Created July 27, 2013 03:56
A CodePen by Benjamin. FansWorld Editable Menu - Feature #380: https://github.com/FansWorldTV/web/issues/380
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1/jquery-ui.min.js"></script>
<link href="http://fansworld.svn.dodici.com.ar/bundles/dodicifansworldweb/css/base.css" rel="stylesheet">
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>
<link href='https://raw.github.com/daneden/animate.css/master/animate.css' rel='stylesheet' type='text/css'>
<script src="//netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/js/bootstrap.min.js"></script>
</head>
<section id="mainContent" class="example">
<div class="row">
<div class="twelve columns">
<h3>Page Title (.twelve .columns)</h3>
</div>
</div>
<div class="row">
<div class="two columns">
<div class="row">
<div class="twelve columns">
(function (root, factory) {
"use strict";
if (typeof exports === 'object') {
// Node. Does not work with strict CommonJS, but
// only CommonJS-like enviroments that support module.exports,
// like Node.
module.exports = factory(require('jquery'), require('debug'));
} else if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['jquery', 'debug'], factory);
///////////////////////////////////////////////////////////////////////////////
// Plugin generador de tags //
///////////////////////////////////////////////////////////////////////////////
$(document).ready(function () {
"use strict";
var pluginName = "fwNotify";
var note = $('<div class="alert"></div>');
var defaults = {
type: 'success',
closable: true,
@maggiben
maggiben / Gamy-Buttons.markdown
Created September 1, 2013 02:33
A Pen by Benjamin.
@maggiben
maggiben / 3D-TagCloud-.markdown
Created September 12, 2013 03:45
A Pen by Benjamin.
@maggiben
maggiben / Iris.markdown
Created November 20, 2013 04:32
A Pen by Benjamin.

Iris

A 2D array of radial fibres connected by springs (thanks to Traer physics). When the fibres are stretched beyond a point, the springs break, creating openings in the fibres like in (some) human irises.

A Pen by Benjamin on CodePen.

License.

@maggiben
maggiben / proxyme.js
Created November 26, 2013 20:33
nodejs super proxy for CORS workaround
console.log('DEV_SERVER.JS:STARTED');
var port = 3000;
var wsProxy = '$instance$.smxecho.com';
var wsPort = 8507;
var echoProxy = '$instance$.smxecho.com';
var echoPort = 8507;