Skip to content

Instantly share code, notes, and snippets.

View gorgogol's full-sized avatar

Nikolaos N. Zisimos gorgogol

View GitHub Profile
@gorgogol
gorgogol / googleResultsCount.js
Created July 26, 2014 15:50
Returns number of google results for search of given term. (example: casperjs --key=java searchGoogle.js) #casperjs
var casper = require('casper').create({
verbose: true,
logLevel: "debug"
});
var key = casper.cli.options['key'];
var url = 'http://www.google.com';
casper.start(url);
@gorgogol
gorgogol / boilerplateCasperScraper.js
Last active August 29, 2015 14:04
Boilerplate casperjs scraper. #casperjs
var casper = require('casper').create();
casper.start('http://en.wikipedia.org/', function(){
// ...
});
casper.then(function(){
@gorgogol
gorgogol / boilerplateCasperTest.js
Last active August 29, 2015 14:04
A skeleton for a casperjs test. #casperjs
casper.test.begin('Test', numTests, function(test){
casper.start('http://en.wikipedia.org/', function(){
//...
});
casper.then(function(){
//...
});
@gorgogol
gorgogol / box2dWeb-bootstrap.html
Last active August 29, 2015 14:04 — forked from incompl/gist:4163433
Bootstrap html file for Box2dWeb based game. #javascript #box2dWeb #gamedev
<!DOCTYPE HTML>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Basic Object Behavior</title>
<script src='js/Box2dWeb-2.1.a.3.js'></script>
<style> canavs { background-color:black; } </style>
</head>
<body>
@gorgogol
gorgogol / bootstrapCarousel.html.part
Last active August 29, 2015 14:05
Simple bootstrap carousel.
<div id="storyboard" class="carousel">
<div class="carousel-inner ">
<div class="item active">
<h1>Slide #1</h1>
</div>
<div class="item ">
<h1>Slide #2</h1>
</div>
</div>
<a class="left carousel-control" href="#storyboard" role="button" data-slide="prev"><span class="glyphicon glyphicon-chevron-left"></span></a>
@gorgogol
gorgogol / bootstrapModalExample.html
Created August 12, 2014 16:15
Bootstrap modal box example.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap carousel</title>
<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">
@gorgogol
gorgogol / bootstrapFormExample.html.part
Created August 12, 2014 16:17
A simple example of a form using Twitter Bootstrap.
<form id="registerForm" role="form" class="form">
<div class="form-group"><label>Username</label><input class="form-control" name="username" type="text" required></input class="form-control" ></div>
<div class="form-group"><label>E-mail</label><input class="form-control" name="email" type="email" required></input class="form-control" ></div>
<div class="form-group"><label>Password</label><input class="form-control" name="password" type="password" required></input class="form-control" ></div>
` <div class="form-group"><label>Password (verify)</label><input class="form-control" name="verifyPassword" type="password" required></input class="form-control" ></div>
</form>
@gorgogol
gorgogol / postForm.js
Created August 16, 2014 10:12
Posting a form with jquery.
jQuery(document).ready(function($){
$('form#aForm').on('submit', function(e){
e.preventDefault();
$.post(
url: form.attr('action');
data: form.serialize(),
success: function(data){
#!/bin/sh
# Usage: bash < <(curl -s https://gist.github.com/raw/965142/install.sh)
if [ ! -d "/Developer/Applications/Xcode.app" ]; then
echo "Please install Xcode first. Exiting."
exit 1
fi
# Have sudo ask us for our password before we kick everything off so we can walk away.
sudo echo "Here we go..."
@gorgogol
gorgogol / .vimrc
Created August 18, 2014 13:15
A vimrc with a set of bundles for web development.
set nocompatible
filetype off
set rtp+=~/.vim/bundle/vundle/
call vundle#rc()
" Let Vundle manage Vundle
Bundle 'gmarik/vundle'
" My Bundles