Skip to content

Instantly share code, notes, and snippets.

@sophy
sophy / template.html
Last active December 29, 2015 15:19 — forked from tinabeans/template.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<!-- http://blog.fogcreek.com/responsive-html-emails-a-different-strategy/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Single-Column Responsive Email Template</title>
<style>
@media only screen and (min-device-width: 541px) {
.content {
@sophy
sophy / angkor.pot
Last active December 24, 2015 19:19
# Directory: languages/
# Copyright (C) 2013 the WordPress team
# This file is distributed under the GNU General Public License v2 or later.
msgid ""
msgstr ""
"Project-Id-Version: Angnkor 1.0\n"
"POT-Creation-Date: 2013-10-13 18:14:18+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
/*
Theme Name: Angkor Theme
Author: Sophy
Author URI: http://wordpress.org/
Version: 1.0
Description: Theme description here
*/
* {
padding: 0;
margin: 0;
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Angkor Theme</title>
<link rel="stylesheet" href="<?php echo get_stylesheet_uri() ?>">
</head>
<body>
<header class="site-header">
Site Header
1. Start postgresql:
systemctl start postgresql-9.2.service
2. Connect to DB
psql -U postgres
3. List all databases
\list lists all databases or \l
4. Select Database
add_filter('comment_form_default_fields', 'url_filtered');
function url_filtered($fields)
{
if(isset($fields['url']))
unset($fields['url']);
if(isset($fields['email']))
unset($fields['email']);
return $fields;
}
Tutorial
========
1. http://mobile.smashingmagazine.com/2013/04/03/build-fast-loading-mobile-website/
2. http://moz.com/blog/15-tips-to-speed-up-your-website
3. http://www.aleydasolis.com/en/mobile-web-seo-tools/
4. http://www.netmagazine.com/features/speeding-mobile-html5-experiences
5. http://www.socialmediaexaminer.com/5-simple-steps-to-getting-started-with-mobile-marketing/
6. http://stackoverflow.com/questions/9511526/auto-mobile-site-redirect
7. http://mobile.smashingmagazine.com/2013/08/12/creating-high-performance-mobile-websites/
8. http://css-tricks.com/which-responsive-images-solution-should-you-use/
<IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine On
RewriteRule (wordpress/.*) $1 [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)/$ http://%{HTTP_HOST}/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>
@sophy
sophy / exam-1.sql
Last active December 19, 2015 07:18
-- QUESTION 1
SELECT
customer.name,
customer.address,
software.name,
softwares_ordering.quantity
FROM
customer, software, softwares_ordering
WHERE (customer.id_customer = softwares_ordering.id_customer)