Skip to content

Instantly share code, notes, and snippets.

View sofadesign's full-sized avatar

Fabrice Luraine sofadesign

  • http://www.lunaweb.fr
View GitHub Profile
@sofadesign
sofadesign / Follow Hyperlink.tmCommand.rb
Created April 16, 2009 07:13
Texmate command: open markdown links
require 'find'
require 'fileutils'
dir = '/your_directory'
Find.find(dir) do |path|
if FileTest.directory?(path) && File.basename(path) == '.svn'
p 'rm directory:' + path
FileUtils.remove_dir(path)
else
# Ways to execute a shell script in Ruby
# Example Script - Joseph Pecoraro
cmd = "echo 'hi'" # Sample string that can be used
# 1. Kernel#` - commonly called backticks - `cmd`
# This is like many other languages, including bash, PHP, and Perl
# Returns the result of the shell command
# Docs: http://ruby-doc.org/core/classes/Kernel.html#M001111
@sofadesign
sofadesign / nginx.conf
Created November 25, 2010 14:17 — forked from mikhailov/installation.sh
Nginx+passenger application config: ssl redirection, http headers, passenger optimal settings. see details: http://mikhailov.posterous.com/nginx
user app;
worker_processes 2;
error_log /home/app/logs/nginx.error.log info;
events {
worker_connections 1024;
}
@sofadesign
sofadesign / latex.template
Created July 16, 2011 12:49 — forked from michaelt/latex.template
Simple Pandoc latex.template with comments
%!TEX TS-program = xelatex
\documentclass[12pt]{scrartcl}
% The declaration of the document class:
% The second line here, i.e.
% \documentclass[12pt]{scrartcl}
% is a standard LaTeX document class declaration:
% we say what kind of document we are making in curly brackets,
% and specify any options in square brackets.