Skip to content

Instantly share code, notes, and snippets.

View tinganho's full-sized avatar

Tingan Ho tinganho

View GitHub Profile
diff --git a/editors/ckeditor.inc b/editors/ckeditor.inc
index 896fc84..dc76a33 100644
--- a/editors/ckeditor.inc
+++ b/editors/ckeditor.inc
@@ -130,8 +130,8 @@ function wysiwyg_ckeditor_settings($editor, $config, $theme) {
'baseHref' => $GLOBALS['base_url'] . '/',
'width' => '100%',
// For better compatibility with smaller textareas.
- 'resize_minWidth' => 450,
- 'height' => 420,
@tinganho
tinganho / CSSSelectorSpecificity
Created July 19, 2012 12:31
CSS Selector specificity
function sortPoints(points) {
points.sort(function(a, b) {
if(a[0] > b[0])
return -1;
if(a[0] < b[0])
return 1;
if(a[1] > b[1])
return -1;
if(a[1] < b[1])
return 1;
# Numerous always-ignore extensions
*.diff
*.err
*.orig
*.log
*.rej
*.swo
*.swp
*.vi
*~
@tinganho
tinganho / gist:5035025
Created February 26, 2013 01:36
Calculation of CSS Selector Specificity
var Specificity = (function() {
var C = {};
function numMatches(selector, regex) {
return (selector.match(regex) || []).length;
}
function is(selector, element) {
var div = document.createElement("div"),
var requirejs = require( 'requirejs' ),
querystring = require( 'querystring' ),
http = require( 'http' ),
globals = requirejs( 'profiles/p1/lib/constants/globals' );
var routes = function( app ) {
var options = {
hostname : globals.ACCOUNTS + '.' + globals.SERVER_DOMAIN,
define(function( require ) {
$ = require('jquery');
Modernizr = require('modernizr');
/**
* @name File
* @class File
* @constructor
*/
@tinganho
tinganho / gist:7694487
Created November 28, 2013 16:23
Google about the future of javascript
---------- Forwarded message ----------
From: Mark S. Miller <erig...@google.com>
Date: Tue, Nov 16, 2010 at 3:44 PM
Subject: "Future of Javascript" doc from our internal "JavaScript Summit"
last week
To: java...@google.com
On November 10th and 11th, a number of Google teams representing a variety
of viewpoints on client-side languages met to agree on a common vision for
the future of Javascript.
npm http GET https://registry.npmjs.org/phonegap
npm http 304 https://registry.npmjs.org/phonegap
npm http GET https://registry.npmjs.org/colors
npm http GET https://registry.npmjs.org/cordova
npm http GET https://registry.npmjs.org/optimist
npm http GET https://registry.npmjs.org/connect-phonegap
npm http GET https://registry.npmjs.org/phonegap-build
npm http GET https://registry.npmjs.org/pluralize
npm http GET https://registry.npmjs.org/prompt
npm http GET https://registry.npmjs.org/qrcode-terminal
sudo npm install -g phonegap --verbose
Password:
npm info it worked if it ends with ok
npm verb cli [ 'node',
npm verb cli '/usr/local/bin/npm',
npm verb cli 'install',
npm verb cli '-g',
npm verb cli 'phonegap',
npm verb cli '--verbose' ]
npm info using npm@1.4.9
@tinganho
tinganho / gist:e343b8ae9e2c221f9241
Created October 6, 2014 16:24
currency symbols
module.exports = {
'AED': {
symbols: {
local: 'د.إ.‏',
global: 'Dhs',
reverseGlobal: 'Dhs'
},
text: {
ar: {