Skip to content

Instantly share code, notes, and snippets.

View montogeek's full-sized avatar

Fernando Montoya montogeek

View GitHub Profile
@montogeek
montogeek / info.md
Last active August 29, 2015 14:00
KarmaJS & Protactor Test with PhantomJS in an Angular Ubuntu Box

I need to star Selenium like a standalone server because it always returned a TimeOut

java -jar node_modules/protractor/selenium/selenium-server-standalone-2.40.0.jar

Then in a another console

npm run protractor

But be sure to already run the project with npm install

vagrant@angularjs /vagrant/angular-phonecat [master]
± % npm test !81
> angular-phonecat@0.0.0 test /vagrant/angular-phonecat
> karma start test/karma.conf.js
INFO [karma]: Karma v0.10.10 server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
ERROR [launcher]: Cannot start Chrome
Can not find the binary google-chrome

Keybase proof

I hereby claim:

  • I am montogeek on github.
  • I am montogeek (https://keybase.io/montogeek) on keybase.
  • I have a public key whose fingerprint is 6E18 431E 4765 B233 C78D 6A66 8DEC EF51 6073 E460

To claim this, I am signing this object:

@montogeek
montogeek / defaultImage.js
Created March 27, 2014 20:37
Load a default image for broken images
function defaultImage() {
$('img').each(function() {
var image = $(this);
if(image.context.naturalWidth == 0 || image.readyState == 'uninitialized'){
$(image).unbind('error').attr(
'src', 'path/no_image.png'
);
}
});
}
0 info it worked if it ends with ok
1 verbose cli [ 'c:\\Program Files (x86)\\nodejs\\node.exe',
1 verbose cli 'c:\\Program Files (x86)\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli 'install' ]
2 info using npm@1.4.3
3 info using node@v0.10.26
4 warn package.json Popcorn-Time@0.2.0 No repository field.
5 verbose readDependencies using package.json deps
6 verbose install where, deps [ 'd:\\Imagine\\Beyond\\popcorn-app',
6 verbose install [ 'adm-zip',
MontoGeek@INFINITE /d/Web/Moodle
$ vagrant ssh
Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-generic x86_64)
* Documentation: https://help.ubuntu.com/
Welcome to your Vagrant-built virtual machine.
Last login: Fri Sep 14 06:23:18 2012 from 10.0.2.2
vagrant@moodle:~$ sudo mount -t vboxsf -o uid=`id -u vagrant`,gid=`getent group vagrant | cut -d: -f3`,nolock,vers=3,udp,noatime /vagrant /vagrant
unknown mount option `noatime'
valid options:
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Importing base box 'precise64'...
[default] Matching MAC address for NAT networking...
[default] Setting the name of the VM...
[default] Clearing any previously set forwarded ports...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Config Github Settings
github_username = "fideloper"
github_repo = "Vaprobash"
github_branch = "master"
# Server Configuration
server_ip = "192.168.33.10"
MontoGeek@INFINITE /d/simr
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Clearing any previously set forwarded ports...
[default] Clearing any previously set network interfaces...
[default] Preparing network interfaces based on configuration...
[default] Forwarding ports...
[default] -- 22 => 2222 (adapter 1)
[default] -- 5432 => 5432 (adapter 1)
[default] Running 'pre-boot' VM customizations...
@montogeek
montogeek / Vagrantfile
Created March 4, 2014 18:07
My Vagrant file
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Config Github Settings
github_username = "fideloper"
github_repo = "Vaprobash"
github_branch = "master"
# Server Configuration
server_ip = "192.168.33.10"