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 pubsub = {}; | |
(function(q) { | |
var topics = {}, subUid = -1; | |
q.subscribe = function(topic, func) { | |
if (!topics[topic]) { | |
topics[topic] = []; | |
} | |
var token = (++subUid).toString(); | |
topics[topic].push({ | |
token: token, |
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
$.ajaxQueue = []; | |
var que = $.ajaxQueue; | |
$.ajaxSetup({ | |
beforeSend: function(){ | |
if (this.queue) { | |
que.push(this); | |
} | |
else { | |
return 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
module.exports = function(config) { | |
config.set({ | |
basePath: '', | |
frameworks: ['jasmine'], | |
files: [ | |
'build/js/**/*.js', | |
'build/tests/**/test_*.js' | |
], | |
exclude: [ | |
], |
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
[ | |
{ | |
"id": 1, | |
"body": "First Item", | |
"severity": 1, | |
"status": 0 | |
}, | |
{ | |
"id": 2, | |
"body": "Second Item", |
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
function isUrl(s) { | |
var regexp = /((http|https):\/\/)?[A-Za-z0-9\.-]{3,}\.[A-Za-z]{2}/; | |
return s.indexOf(' ') < 0 && regexp.test(s); | |
} | |
isUrl('http://fatihacet.com.tr') |
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
#!/bin/sh | |
#usage : ./scripts/minify.sh | |
echo "Deleting old content of compressed file..." | |
echo "" > css/compressed/all.css | |
echo "Combining all css files into one.." | |
cat \ | |
css/reset.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
$.ajax({ | |
type: 'GET', | |
dataType: 'xml', | |
url: '/feed', | |
success: function(xmlDocument) { | |
var rss = $(xmlDocument.firstChild); | |
console.log(rss.find('item')); | |
} | |
}); |
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
{ | |
"close_windows_when_empty": false, | |
"color_scheme": "Packages/One Dark Color Scheme/One Dark.tmTheme", | |
"detect_indentation": false, | |
"enable_tab_scrolling": false, | |
"ensure_newline_at_eof_on_save": true, | |
"env": | |
{ | |
"PATH": "/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/usr/local/share/npm/bin/" | |
}, |
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
{ | |
"name": "themeswitch", | |
"version": "0.0.1", | |
"description": "Easily switch between your two predefined themes for Sublime Text.", | |
"dependencies": {}, | |
"devDependencies": { | |
"coffee-script": "^1.9.3", | |
"json-format": "0.0.1" | |
}, | |
"author": "Fatih Acet <fatih@fatihacet.com>" |
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
new Vue({ | |
el: '#app', | |
methods: { | |
validate() { | |
VueValidator(this, () => { | |
console.log('single input is valid'); | |
}); | |
} | |
} | |
}) |
NewerOlder