This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. replace @ with $ | |
Find: @ | |
Replace: $ | |
2. replace mixins | |
Find: \.([\w\-]*)\s*\((.*)\)\s*\{ | |
Replace: @mixin \1\(\2\)\n{ | |
3. replace includes | |
Find: \.([\w\-]*\(.*\)\s*;) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#user nobody; | |
worker_processes 2; | |
worker_priority -5; | |
error_log /var/www/landmoda/log/nginx.error.log crit; | |
events { | |
# use epoll; | |
worker_connections 1024; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="bio"> | |
<p><strong>{{ model.name }}</strong></p> | |
<br> | |
<div class="content"> | |
{{ model.aboutme }} | |
</div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
date = Time.now | |
start_date = Time.new(date.year, date.month, 1) | |
end_date = start_date + 1.month |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |