Skip to content

Instantly share code, notes, and snippets.

View electricg's full-sized avatar

Giulia Alfonsi electricg

View GitHub Profile
@electricg
electricg / fiddle.js
Created February 9, 2012 10:04
jQuery plugins for different <select> functionalities
(function($) {
// Autocomplete from the select
$.fn.autoSelect = function(options) {// plugin definition
var defaults = {
prex : 'listBean_field',
subx : 'Col',
prexTo : 'listBean_field',
subxTo : 'Name',
resetVal : -1
};
@electricg
electricg / fiddle.css
Created April 8, 2012 14:32
Show more/less in pure CSS3
/* code not necessary for the effect, just to make it pretty */
html {
background-color: #EEE;
overflow-y: scroll;
}
body {
color: #333;
font-family: Verdana;
font-size: 14px;
margin: 0 auto;
@electricg
electricg / fiddle.css
Created April 11, 2012 09:17
Change color to select box with jQuery
/* code not necessary for the effect, just to make it pretty */
html {
background-color: #EEE;
overflow-y: scroll;
}
body {
color: #333;
font-family: Verdana;
font-size: 14px;
margin: 0 auto;
@electricg
electricg / fiddle.css
Created April 11, 2012 10:01
Remove selected option with jQuery
/* code not necessary for the effect, just to make it pretty */
html {
background-color: #EEE;
overflow-y: scroll;
}
body {
color: #333;
font-family: Verdana;
font-size: 14px;
margin: 0 auto;
@electricg
electricg / fiddle.html
Created April 11, 2012 13:53
Geolocation and Flickr photos taken nearby - jQuery plugin
<figure class="flickr">
<figcaption></figcaption>
</figure>
@electricg
electricg / win.md
Last active October 7, 2015 04:18
Windows software list for work
@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
@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 / 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 / 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 ?>">