Skip to content

Instantly share code, notes, and snippets.

View electricg's full-sized avatar

Giulia Alfonsi electricg

View GitHub Profile
@electricg
electricg / mq.css
Created October 4, 2012 09:24 — forked from chriscoyier/mq.css
Media Queries for high resolution displays
@media only screen and (min-width: 320px) {
/* Small screen, non-retina */
}
@media
only screen and (-webkit-min-device-pixel-ratio: 2) and (min-width: 320px),
only screen and ( min--moz-device-pixel-ratio: 2) and (min-width: 320px),
only screen and ( -o-min-device-pixel-ratio: 2/1) and (min-width: 320px),
@electricg
electricg / readme.md
Created September 19, 2012 21:18
Sublime Text 2
@electricg
electricg / Compass.sublime-build
Last active October 10, 2015 19:48
SublimeText2 - my User settings
{
"cmd": ["cd '$project_path'; compass watch"],
"working_dir": "$packages/Compass",
"selector": "source.sass",
"shell": "true",
"windows":
{
"cmd": ["compasswatch.bat", "$project_path"]
},
"osx":
@electricg
electricg / readme.md
Created August 15, 2012 18:57
Install SASS and Compass on Mac OSX

gem install sass

If you installed as your "normal" user account (didn't sudo), you most likely missed the warning message like this one:

WARNING: Installing to ~/.gem since /Library/Ruby/Gems/1.8 and /usr/bin aren't both writable. WARNING: You don't have /Users/jclark/.gem/ruby/1.8/bin in your PATH, gem executables will not run. Try this:

@electricg
electricg / git.md
Created August 15, 2012 11:01
Notes on Git

Installing Git

git config --global core.autocrlf false http://stackoverflow.com/questions/1967370/git-replacing-lf-with-crlf "If core.autocrlf is set to false, no line-ending conversion is ever performed, so text files are checked in as-is. This usually works ok, as long as all your developers are either on Linux or all on Windows."

Run GitForce.exe from msysgit console

@electricg
electricg / dynamic-banner.html
Created August 13, 2012 12:49
Move the banner in the middle of a grid after a specified row
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Dynamic Banner</title>
<style>
/* for presentation only */
body {
font-family: Arial;
}
@electricg
electricg / noref.php
Created July 31, 2012 10:49
Remove referer and anonymize links
<?php
$url = getenv('QUERY_STRING');
if ($url == '') {
die ('THIS SCRIPT CANNOT BE CALLED DIRECTLY!');
}
?><!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="refresh" content="0; URL=<?php echo $url ?>">
@electricg
electricg / main.html
Created July 30, 2012 15:45
Rotate jquery plugin - temp
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Rotation</title>
<style type="text/css" media="screen">
.wrapper {
width: 320px;
}
@electricg
electricg / _post.md
Last active October 7, 2015 15:38
Virtul machine Apache server

Virtul machine Apache server

Since so far all my jobs have required me (read: they assigned me) Windows machines, I find more comfortable working with Ubuntu that makes setting up/installing/using various software far more easily.

I use Oracle VM VirtualBox which is free and fairly easy to use (don't forget to install the Extension Pack) and Ubuntu.

Settings for the Ubuntu VM:

  • System
    • Motherboard
  • Boot order:
@electricg
electricg / gist:3176149
Created July 25, 2012 13:17
Backup todo for my Mac OS X (before upgrading to Mountain Lion)
* Wifi password
* Users/electric_g
* Documents
* Downloads
* Dropbox
* Ebook
* Library
* Manuals
* Music/My Music
* Pictures/Desktop