Skip to content

Instantly share code, notes, and snippets.

// global scope
var theFu; // theFu has been declared, but its value is undefined
typeof theFu; // "undefined"
@Aither99
Aither99 / jquery-launch.js
Created December 9, 2013 17:07
jQuery anonymous $
(function( $ ) {
$(function() {
// More code using $ as alias to jQuery
});
})(jQuery);
@Aither99
Aither99 / utf_
Created July 24, 2013 15:23
MySQL CLI utf8
mysql -uroot ambre_cnrs --default-character-set=utf8 < update_document_type.sql
@Aither99
Aither99 / delete_last_char.sql
Created July 23, 2013 09:59
DELETE LAST char of field
UPDATE kl_question
SET title = SUBSTR(title, 1, CHAR_LENGTH(title) - 1)
WHERE culture = 'el_GR'
AND title LIKE '%;';
@Aither99
Aither99 / countries name and code.sql
Created July 4, 2013 15:56
database of countries name and code iso2/3
--
-- List of world's countries containing the official short names in English as given in ISO 3166-1,
-- the ISO 3166-1-alpha-2 code provided by the International Organization for Standardization
-- (http://www.iso.org/iso/prods-services/iso3166ma/02iso-3166-code-lists/country_names_and_code_elements)
-- and the ISO alpha-3 code provided by the United Nations Statistics Division
-- (http://unstats.un.org/unsd/methods/m49/m49alpha.htm)
--
-- compiled by Stefan Gabos
-- version 1.2 (last revision: December 09, 2012)
--
@Aither99
Aither99 / Contries ISO 3166-1 alpha-3
Created July 4, 2013 15:52
array of Contries ISO 3166-1 alpha-3
<?php
$iso_array = array(
'ABW'=>'Aruba',
'AFG'=>'Afghanistan',
'AGO'=>'Angola',
'AIA'=>'Anguilla',
'ALA'=>'Åland Islands',
'ALB'=>'Albania',
'AND'=>'Andorra',
'ARE'=>'United Arab Emirates',
@Aither99
Aither99 / Contries ISO 3166-1 alpha-2
Created July 4, 2013 15:52
array of Contries ISO 3166-1 alpha-2
<?php
$countries = array
(
'AF' => 'Afghanistan',
'AX' => 'Aland Islands',
'AL' => 'Albania',
'DZ' => 'Algeria',
'AS' => 'American Samoa',
'AD' => 'Andorra',