Skip to content

Instantly share code, notes, and snippets.

View galaakk's full-sized avatar

Eric Dejonckheere galaakk

View GitHub Profile
@galaakk
galaakk / gist:3768225
Created September 22, 2012 23:34
SHELL : download site
wget --mirror -p --convert-links -P ./DIR URL
@galaakk
galaakk / gist:3768219
Created September 22, 2012 23:31
SHELL : OSX ramdisk
#!/bin/bash
#######################
# A script by Salvatore Sanfilippo
#####################
ramfs_size_mb=1024
mount_point=~/volatile
ramfs_size_sectors=$((${ramfs_size_mb}*1024*1024/512))
@galaakk
galaakk / gist:3768131
Created September 22, 2012 22:53
SHELL : my favorite OSX defaults
echo "Remove Dropbox’s green checkmark icons in Finder"
file=/Applications/Dropbox.app/Contents/Resources/check.icns
[ -e "$file" ] && mv -f "$file" "$file.bak"
unset file
# echo "Reset Launchpad"
# [ -e ~/Library/Application\ Support/Dock/*.db ] && rm ~/Library/Application\ Support/Dock/*.db
echo "Show the ~/Library folder"
chflags nohidden ~/Library
@galaakk
galaakk / gist:3729725
Created September 15, 2012 20:58
CSS : Fade text
#tobefaded {
width:730px;
height:133px;
line-height:0px;
color:transparent;
font-size:50px;
font-family:"HelveticaNeue-Light","Helvetica Neue Light","Helvetica Neue", Helvetica, Arial,sans-serif;
font-weight:300;
text-transform:uppercase;
@galaakk
galaakk / gist:3729718
Created September 15, 2012 20:56
CSS : Drop cap
p:first-letter{
display:block;
margin:5px 0 0 5px;
float:left;
color:#000;
@galaakk
galaakk / gist:3723192
Created September 14, 2012 16:50
CSS : Full background image (from css-tricks.com)
img.bg {
/* Set rules to fill background */
min-height: 100%;
min-width: 1024px;
/* Set up proportionate scaling */
width: 100%;
height: auto;
/* Set up positioning */
@galaakk
galaakk / gist:3684758
Created September 9, 2012 14:38
CSS : Simple columns system
// Copyright Chris Coyier, if I remember well.
#wrapper{max-width: 1024px;margin: 0 auto;}
*, *:after, *:before {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
@galaakk
galaakk / send-mail.php
Created September 8, 2012 20:17
PHP : Simple e-mail send
<?php
$mail_to = 'myname@mydomain.com';
$name = $_POST['sender_name'];
$mail_from = $_POST['sender_email'];
$message = $_POST['sender_message'];
$subject = 'Subject ' . $name;
$body_message = 'From: ' . $name . "\r\n";
@galaakk
galaakk / gist:3679326
Created September 8, 2012 20:11
SCSS : Link mixin
@mixin lien(){
font-size:$linkFontSize;
background-color:$bgLinkColor;
color:$textLinkColor;
padding:$linkPaddingTop $linkPaddingRight $linkPaddingBottom $linkPaddingLeft;
border:$linkBorderSize $linkBorderColor $linkTexture;
@include border-radius($linkRadius);
@include transition-property($transitionProperty);
@include transition-duration($transitionDuration);
&:hover{
@galaakk
galaakk / gist:3679225
Created September 8, 2012 19:58
jQuery : Simple slide-up
jQuery(function($) {
$('.classe').live('click',function(){
$(this).parent().slideUp();
return false;
})
});