Skip to content

Instantly share code, notes, and snippets.

<?php
/*
* File: SimpleImage.php
* Author: Simon Jarvis
* Modified by: Miguel Fermín
* Based in: http://www.white-hat-web-design.co.uk/articles/php-image-resizing.php
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
<?php
/*
* @name DataBase class
* @author Miguel Fermín
* @copyright 2013
* @license Do whatever you want with this class
*/
class DataBase {
var $con;
@salipro4ever
salipro4ever / app.js
Created November 8, 2013 03:29 — forked from clarle/app.js
// Module dependencies
var express = require('express'),
mysql = require('mysql');
// Application initialization
var connection = mysql.createConnection({
host : 'localhost',
user : 'root',
/* Vietnamese localization for the jQuery UI date picker plugin. */
/* Written by Tien Do (tiendq@gmail.com) */
jQuery(function ($)
{
$.datepicker.regional["vi-VN"] =
{
closeText: "Đóng",
prevText: "Trước",
nextText: "Sau",
<style>
/* from http://www.mobilexweb.com/blog/ios-5-1-new-ipad-web-developers */
@media screen and (-webkit-device-pixel-ratio: 2) {
/* retina display */
}
</style>
<script>
// from https://developer.mozilla.org/en/DOM/window.matchMedia
if (window.matchMedia("(-webkit-device-pixel-ratio: 2)").matches) {
/*!
* jQuery JavaScript Library v1.11.0pre
* http://jquery.com/
*
* Includes Sizzle.js
* http://sizzlejs.com/
*
* Copyright 2005, 2013 jQuery Foundation, Inc. and other contributors
* Released under the MIT license
* http://jquery.org/license
@salipro4ever
salipro4ever / BrowserSelector
Created January 7, 2014 15:30
Tương tự Modernizr, hiển thị tên Browser, phiên bản... trong HTML tag. + Usage: $.browserSelector();
/*
Plugin Name: BrowserSelector
Written by: Crivos - (http://www.crivos.com)
Version: 0.1
*/
(function($) {
$.extend({
browserSelector: function() {
@salipro4ever
salipro4ever / smoothBrowserScroll
Created January 7, 2014 15:42
for chrome, usage: $.smoothBrowserScroll()
(function($) {
$.extend({
smoothBrowserScroll: function() {
// Scroll Variables (tweakable)
var defaultOptions = {
// Scrolling Core
frameRate : 150, // [Hz]
/*
* Copyright (C) 2004 Baron Schwartz <baron at sequent dot org>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by the
* Free Software Foundation, version 2.1.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more