Skip to content

Instantly share code, notes, and snippets.

View ehq's full-sized avatar

Lucas Nasif ehq

  • https://thinklemma.com
  • Argentina
View GitHub Profile
@ehq
ehq / new_menu.js
Created January 11, 2017 17:40 — forked from bocha/new_menu.js
// Main Menu functionalities.
var MainMenu = function() {}
MainMenu.body = $('body');
MainMenu.menu = $('#main-menu-nav');
MainMenu.burguerIcon = MainMenu.menu.find('.burguer-menu');
MainMenu.wrapper = $('#main-menu-container');
MainMenu.listItem = MainMenu.wrapper.find('ul li a');
// check if value is an integer
function isInt(value){
return Number(value) === value && value % 1 === 0;
}
// function to flatten an array
function flatten(data, isInteger) {
var result = [];
// initialize data if input is undefined/empty
@ehq
ehq / gist:7758208
Last active December 30, 2015 01:49 — forked from fernandoaleman/gist:5083680
sudo yum -y update
cd /opt
sudo wget -c http://download.virtualbox.org/virtualbox/4.3.4/VBoxGuestAdditions_4.3.4.iso -O VBoxGuestAdditions_4.3.4.iso
sudo mount VBoxGuestAdditions_4.3.4.iso -o loop /mnt
cd /mnt
sudo sh VBoxLinuxAdditions.run --nox11
cd /opt
sudo rm *.iso
sudo /etc/init.d/vboxadd setup
@ehq
ehq / gist:5754640
Last active December 18, 2015 08:29 — forked from bocha/gist:5754636
$("#search").keydown(function(e) {
var $resultsUl = $("#suggested-result");
var $currentSelection = $resultsUl.find("li.highlighted:visible");
if ($currentSelection.length == 0) return;
if (e.keyCode == 40) { // keyCode 40 == down
var $next = $currentSelection.next();
if ($next.length > 0) {
@ehq
ehq / gist:5663184
Last active December 17, 2015 19:49 — forked from bocha/gist:5663166
Cuba.define do
on "apis" do
on "speech" do
on root do
render("speech", title: "Speech API")
end
on "docs" do
render("docs", title: "Speech API Documentation")
end
@ehq
ehq / def2.rb
Created August 13, 2011 06:17 — forked from anonymous/def2.rb
Ruote.process_definition do
sequence do
my_participant :name => 'x', :ptimeout => '10d', :reminder => '9d'
end
# ...
define 'my_participant' do