Skip to content

Instantly share code, notes, and snippets.

View yvesvanbroekhoven's full-sized avatar

Yves Van Broekhoven yvesvanbroekhoven

View GitHub Profile
@yvesvanbroekhoven
yvesvanbroekhoven / httpd.conf
Created November 7, 2012 10:25
Apache dev config Mac OSX
#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.2> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.2/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
@yvesvanbroekhoven
yvesvanbroekhoven / convert.rb
Created November 5, 2012 14:19
Convert mp4 to m4v, ogv & gif
#
# Convert mp4 to m4v, ogv & gif
#
# Dependencies:
# * ffmpeg (brew install ffmpeg)
# * ffmpeg2theora (brew install ffmpeg2theora)
#
# Put this file in a folder containing mp4's you want to convert.
#
# In terminal run following command:
@yvesvanbroekhoven
yvesvanbroekhoven / sublime_text_2_dropbox.sh
Last active May 7, 2017 10:58
Sublime Text 2 Dropbox sync
rm -r ~/Library/Application\ Support/Sublime\ Text\ 2/Installed\ Packages
rm -r ~/Library/Application\ Support/Sublime\ Text\ 2/Packages
rm -r ~/Library/Application\ Support/Sublime\ Text\ 2/Pristine\ Packages
ln -s ~/Dropbox/Application\ Support/Sublime\ Text\ 2/Installed\ Packages/ ~/Library/Application\ Support/Sublime\ Text\ 2/Installed\ Packages
ln -s ~/Dropbox/Application\ Support/Sublime\ Text\ 2/Packages/ ~/Library/Application\ Support/Sublime\ Text\ 2/Packages
ln -s ~/Dropbox/Application\ Support/Sublime\ Text\ 2/Pristine\ Packages/ ~/Library/Application\ Support/Sublime\ Text\ 2/Pristine\ Packages
@yvesvanbroekhoven
yvesvanbroekhoven / mediaquery.sublime-snippet
Created August 31, 2012 09:35
Sublime snippet CSS media query
<snippet>
<content><![CDATA[
@media (min-width: \$min_width_${1:size}) {
${2}
}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>@media</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
@yvesvanbroekhoven
yvesvanbroekhoven / application_helper.rb
Created August 9, 2012 13:46
Frontend Lalala helpers
module ApplicationHelper
#
# Returns css class for <body>
#
def body_class
body_class = []
body_class << (params[:controller].gsub('_','-') rescue nil)
body_class << (params[:action].gsub('_','-') rescue nil)
body_class << @body_class if @body_class
html,
body {
padding: 0;
margin: 0;
}
body {
background-color: #eeeeee;
font-family: sans-serif;
}
#wrapper {
@yvesvanbroekhoven
yvesvanbroekhoven / Preferences.sublime-settings
Created July 12, 2012 17:52
My Sublime Text 2 settings
{
"color_scheme": "Packages/Color Scheme - Default/Cobalt.tmTheme",
// Note that the font_face and font_size are overriden in the platform
// specific settings file, for example, "Preferences (Linux).sublime-settings".
// Because of this, setting them here will have no effect: you must set them
// in your User File Preferences.
"font_face": "Monaco",
"font_size": 12,
@yvesvanbroekhoven
yvesvanbroekhoven / jquery-extlink.js
Created February 23, 2012 09:29
Open external links in a new window
@yvesvanbroekhoven
yvesvanbroekhoven / gist:1876871
Created February 21, 2012 14:38
regex <blockquote>

In this string I want to regex all the <blockquote> tags. As match result I want the content of <blockquote>.

<blockquote>
<p>However, it has become increasingly apparent that the relationship fdsqjmreksqjkl mdfsmljkdfsmljkdfs mlkjsqd</p>
</blockquote>
<p>Genetics is a core discipline related to all activities of the LIBD. The genetics project will maintain a state of the art laboratory facility for definitive gene analysis, including genetic and epigenetic analysis in human and animal tissues, and in cell lines, and it will establish deep collaborations with the NIH and with other genetics groups around the world. The genetics core project will be focused on moving genetic association to the clinical level and to guiding the genetic work of the other projects. <blockquote>
<p>However, it has become increasingly apparent that the relationship fdsqjmreksqjkl mdfsmljkdfsmljkdfs mlkjsqd</p>
</blockquote>This will be an end-&shy;&shy; stage functional genetics project, not merely more genotyping and sequ
@yvesvanbroekhoven
yvesvanbroekhoven / grid.scss
Created February 19, 2012 09:23
Sass semantic grid approach
// Defaults which you can freely override
$column-width: 60px;
$gutter-width: 20px;
$columns: 12;
// Utility function — you should never need to modify this
@function gridsystem-width($columns:$columns) {
@return ($column-width * $columns) + ($gutter-width * $columns);
}