Skip to content

Instantly share code, notes, and snippets.

Ara Pehlivanian arapehl

Block or report user

Report or block arapehl

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am arapehl on github.
  • I am ara (https://keybase.io/ara) on keybase.
  • I have a public key whose fingerprint is 32DC 5375 BA03 1945 F640 DD9F DF75 2E70 7CA3 6502

To claim this, I am signing this object:

@arapehl
arapehl / no-function.js
Last active Aug 29, 2015
Functions should return a value
View no-function.js
var contentEl = $('foo').hasClass('content') ? target : $(target).closest('.content');
View .vimrc
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Maintainer:
" Amir Salihefendic
" http://amix.dk - amix@amix.dk
"
" Version:
" 5.0 - 29/05/12 15:43:36
"
" Blog_post:
" http://amix.dk/blog/post/19691#The-ultimate-Vim-configuration-on-Github
@arapehl
arapehl / pig_latin.js
Created Apr 4, 2013
A very simple pig latin translator. Won't handle capitals or punctuation.
View pig_latin.js
function pigLatin(phrase) {
var arr, pigged;
arr = phrase.split(" ");
pigged = arr.map(function (word) {
var first, rest;
first = word.substring(0, 1);
rest = word.substring(1);
return rest + first + "ay";
@arapehl
arapehl / gist:1114622
Created Jul 29, 2011 — forked from rgrove/gist:1114618
Using YUI group configs to combo handle custom modules
View gist:1114622
YUI({
groups: {
'my-group': {
comboBase: 'http://example.com/combo?',
combine : true,
root : 'build/',
modules: {
/* custom module definitions */
}
@arapehl
arapehl / parseInt.js
Created Jun 15, 2011
Defaults parseInt's radix to 10
View parseInt.js
if (parseInt('080') === 0) {
/*global _parseInt*/
_parseInt = parseInt;
parseInt = function (str, radix) {
return _parseInt(str, radix || 10);
}
}
View lazy_parse_int.js
var APP = (function(window) {
function parseInt(str, radix) {
radix = radix || 10;
return window.parseInt(str, radix);
}
return {
// Sub-objects and methods that
// use the modified parseInt...
//
@arapehl
arapehl / gist:1019584
Created Jun 10, 2011
jQuery vs. YUI 3 custom events
View gist:1019584
// jQuery
$('#foo').bind('customEvent', function () {
alert('foo');
});
$('#foo').trigger('foo');
// YUI 3
View base.js
YUI.add('base', function (Y) {
Y.namespace('proof');
}, '0.0.1');
You can’t perform that action at this time.