This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
سمَـَّوُوُحخ ̷̴̐خ ̷̴̐خ ̷̴̐خ امارتيخ ̷̴̐خ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var hasFlash = false; | |
try { | |
var fo = new ActiveXObject('ShockwaveFlash.ShockwaveFlash'); | |
if(fo) hasFlash = true; | |
}catch(e){ | |
if(navigator.mimeTypes ["application/x-shockwave-flash"] != undefined) hasFlash = true; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
1. save this file in ui/data folder with a name | |
for example if its reader discussion ajax reader_discussion_ajax.js | |
2. go to reader.js or builder.js | |
3. require this new file add | |
var newAwesomeFile = require('ui/reader_discussion_ajax'); | |
4. in the initialize in reader.js attach this file to a DOM node. | |
if its global add it to document | |
example: | |
newAwesomeFile.attachTo('#yourParentSelector'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var httpProxy = require('http-proxy'); | |
var proxy = httpProxy.createProxyServer(); | |
var http = require('http') | |
http.createServer(function(req, res) { | |
proxy.web(req, res, { target: 'http://127.0.0.1/'}); | |
}).listen(8787); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
linkify: function(inputText) { | |
var replacedText, replacePattern1, replacePattern2, replacePattern3; | |
replacePattern1 = /(\b(https?|ftp):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gim; | |
replacedText = inputText.replace(replacePattern1, '<a href="$1" target="_blank">$1</a>'); | |
replacePattern2 = /(^|[^\/])(www\.[\S]+(\b|$))/gim; | |
replacedText = replacedText.replace(replacePattern2, '$1<a href="http://$2" target="_blank">$2</a>'); | |
replacePattern3 = /(([a-zA-Z0-9\-\_\.])+@[a-zA-Z\_]+?(\.[a-zA-Z]{2,6})+)/gim; | |
replacedText = replacedText.replace(replacePattern3, '<a href="mailto:$1">$1</a>'); | |
replacedText = replacedText.replace(/\B@([\w-]+)/gm, '<a href="http://twitter.com/$1" target="_blank">@$1</a>'); | |
return replacedText; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
encode4HTML:function(str) { | |
return str | |
//.replace(/\r\n?/g,'\n') | |
// normalize newlines - I'm not sure how these | |
// are parsed in PC's. In Mac's they're \n's | |
//.replace(/(^((?!\n)\s)+|((?!\n)\s)+$)/gm,'') | |
// trim each line | |
//.replace(/(?!\n)\s+/g,' ') | |
// reduce multiple spaces to 2 (like in "a b") | |
//.replace(/^\n+|\n+$/g,'') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (var i = 0; i < 6; i++) { | |
x = basepos.x + Math.sin( (Math.PI/12*i))*(600); | |
y = basepos.y + Math.cos( (Math.PI/12*i))*(600); | |
this.deployStar(x,y); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var render = require('./app/render.js'); | |
// Build our templates | |
gulp.task('templates', function() { | |
render.render(templateData.JS, templateData.CSS); | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows: | |
"chromium-args": "--in-process-gpu --ignore-gpu-blacklist --enable-webgl --disable-transparency --disable-device-orientation" | |
Linux: | |
"chromium-args": "--ignore-gpu-blacklist --enable-webgl --disable-transparency --disable-device-orientation --disable-setuid-sandbox" | |
Mac OS X: | |
"chromium-args": "--ignore-gpu-blacklist --enable-webgl --disable-transparency --disable-device-orientation" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"bold_folder_labels": true, | |
"caret_style": "phase", | |
"color_scheme": "Packages/Theme - Spacegray/base16-eighties.dark.tmTheme", | |
"detect_indentation": true, | |
"draw_minimap_border": true, | |
"draw_white_space": "selection", | |
"ensure_newline_at_eof_on_save": true, | |
"fade_fold_buttons": false, | |
"folder_exclude_patterns": |
OlderNewer