Skip to content

Instantly share code, notes, and snippets.

View angelbotto's full-sized avatar
🏃

Angel Celis Botto angelbotto

🏃
View GitHub Profile
// Generated on 2014-02-02 using generator-angular 0.7.1
'use strict';
// # Globbing
// for performance reasons we're only matching one level down:
// 'test/spec/{,*/}*.js'
// use this if you want to recursively match all subfolders:
// 'test/spec/**/*.js'
module.exports = function (grunt) {
@angelbotto
angelbotto / templateangular.rb
Created February 1, 2014 20:33
Template angular kreattiewe team
# Template for an AngularJS app. It uses bower to manage your frontend resources.
opts = options.dup
opts.delete :template
project opts.merge(renderer: :erb), stylesheet: :scss, orm: :mongoid
# Default routes
APP_INIT = <<-APP
get :index do
@title = 'Index'
@ng_app = "app"
@angelbotto
angelbotto / convert
Created January 2, 2014 21:09
less to scss
1. replace @ with $
Find: @
Replace: $
2. replace mixins
Find: \.([\w\-]*)\s*\((.*)\)\s*\{
Replace: @mixin \1\(\2\)\n{
3. replace includes
Find: \.([\w\-]*\(.*\)\s*;)
@angelbotto
angelbotto / nginx.conf
Created December 13, 2013 12:15
perfect nginx.conf for padrino :)
#user nobody;
worker_processes 2;
worker_priority -5;
error_log /var/www/landmoda/log/nginx.error.log crit;
events {
# use epoll;
worker_connections 1024;
}
# NOTICE: to get Nginx+Unicorn best-practices configuration see the gist https://gist.github.com/3052776
$ cd /usr/src
$ wget http://nginx.org/download/nginx-1.2.1.tar.gz
$ tar xzvf ./nginx-1.2.1.tar.gz && rm -f ./nginx-1.2.1.tar.gz
$ wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.30.tar.gz
$ tar xzvf pcre-8.30.tar.gz && rm -f ./pcre-8.30.tar.gz
$ wget http://www.openssl.org/source/openssl-1.0.1c.tar.gz
@angelbotto
angelbotto / about.liquid
Created December 9, 2013 04:32
Getsimple minimalist theme for newbiews model's
<div id="bio">
<p><strong>{{ model.name }}</strong></p>
<br>
<div class="content">
{{ model.aboutme }}
</div>
</div>
@angelbotto
angelbotto / about.liquid
Last active December 30, 2015 18:29
Zoomy theme for landmoda newbies model's
<br>
<div class="content">
<div class="container">
<div class="about">
<div class="row">
<div class="span6">
<div class="about_image">
<img src="http://s3.landmoda.com/multimedia/{{ model.identificator }}/book/{{ book.multimedias.first.name }}" alt="">
</div>
</div>
@angelbotto
angelbotto / vid2gif.pl
Created December 2, 2013 05:49
Create gif from video .... #newproject
#!/usr/bin/perl
# Quick script to convert a video file to a GIF based on time indicators.
# Inspired by the ugly Bash script at http://www.davidgouveia.net/2011/09/how-to-convert-video-to-animated-gifs-from-a-linux-console/
# See `vid2gif --help` for more info.
use strict;
use warnings;
use diagnostics; # useful for debugging;
use feature 'say'; # beats print;
use Getopt::Long; # for parsing command-line options;
use File::Temp; # for tempdirs to store scratch files;
@angelbotto
angelbotto / date_range.rb
Created December 1, 2013 22:37
Perfect for create charts..
date = Time.now
start_date = Time.new(date.year, date.month, 1)
end_date = start_date + 1.month
# We generate a basic project
say
dev = yes?("Are you using padrino-dev?").present?
tiny = yes?("Do you need a tiny structure?").present?
adapter = ask("SQL adapter for ActiveRecord (sqlite, mysql, postgres, none):")
project :test => :none, :renderer => :haml, :script => :jquery, :orm => :activerecord, :dev => dev, :tiny => tiny, :adapter => adapter
say "=> Installing exception notifier", :magenta
execute_runner :plugin, :exception_notifier