Skip to content

Instantly share code, notes, and snippets.

var canNotify = function() {
if ("Notification" in window) {
if (Notification.permission === 'granted') {
return true;
} else if (Notification.permission !== 'denied') {
Notification.requestPermission(function (permission) {
if(!('permission' in Notification)) {
Notification.permission = permission;
}
@ghooghe
ghooghe / oracle-resize-temp-tablespace.sql
Created November 6, 2013 14:37
Oracle : Resizing Temporary Tablespace
alter database tempfile '<path to TMP.dbf file>' resize 250M;
@ghooghe
ghooghe / iffe.js
Created November 6, 2013 14:36
Javascript iffe skeleton
;(function ($) {
'use strict';
}(jQuery));
@ghooghe
ghooghe / border-radius.css
Created November 5, 2013 19:40
Cross browser border-radius
.rounded {
-moz-border-radius: 0.6rem;
-webkit-border-radius: 0.6rem;
border-radius: 0.6rem;
}
@ghooghe
ghooghe / flash-highlight.css
Created September 23, 2013 14:10
flash highlight with css3 animation IE10+
.flash {
-moz-animation: flash 2s ease-out;
-moz-animation-iteration-count: 1;
-webkit-animation: flash 2s ease-out;
-webkit-animation-iteration-count: 1;
-ms-animation: flash 2s ease-out;
-ms-animation-iteration-count: 1;
animation: flash 2s ease-out;
animation-iteration-count: 1;
}
$ mysql -u root -p
Enter password:
mysql> create database amarokdb;
Query OK, 1 row affected (0.00 sec)
mysql> grant usage on *.* to amarokuser@localhost identified by ‘amarokpasswd’;
Query OK, 0 rows affected (0.00 sec)
mysql> grant usage on *.* to amarokuser@localhost identified by ‘amarokpasswd’;
@ghooghe
ghooghe / wget-save.sh
Created July 3, 2013 18:43
Wget to save a website for local use
wget -rkpE <uri>
# -r : récursif
# -k : converti les liens en liens locaux
# -p : télécharge tous les fichiers nécéssaires à l'affichage de la page en local
# -E : modifie les extensions des pages Web en .html
@ghooghe
ghooghe / css-gradient.css
Created June 17, 2013 08:55
Css3 gradients
#example1 {
/* fallback */
background-color: #063053;
/* chrome 2+, safari 4+; multiple color stops */
background-image:-webkit-gradient(linear, left bottom, left top, color-stop(0.32, #063053), color-stop(0.66, #395873), color-stop(0.83, #5c7c99));
/* chrome 10+, safari 5.1+ */
background-image: -webkit-linear-gradient(#063053, #395873, #5c7c99);
/* firefox; multiple color stops */
background-image: -moz-linear-gradient(top,#063053, #395873, #5c7c99);
/* ie 6+ */
@ghooghe
ghooghe / epaper.css
Created June 11, 2013 15:26
Epaper styles
.fullscreen {
background-color: #e3e3e3;
position: absolute;
width: 100%;
height: 100%;
top: 0 ;
left: 0;
z-index: 10;
overflow-x: hidden;
}
@ghooghe
ghooghe / obox.css
Created June 11, 2013 15:21
obox.css
.obox {
top: 0;
left: 0;
position: absolute;
z-index: 100;
overflow-x: hidden;
overflow-y: auto;
/*max-width: 930px;*/
}