Skip to content

Instantly share code, notes, and snippets.


Ömer Aslanbakan Eomerx

View GitHub Profile
romainl / .ctags
Last active Jan 20, 2021
My ctags config
View .ctags
--regex-less=/^[ \t&]*#([A-Za-z0-9_-]+)/\1/i,id,ids/
--regex-less=/^[ \t&]*\.([A-Za-z0-9_-]+)/\1/c,class,classes/
--regex-less=/^[ \t]*(([A-Za-z0-9_-]+[ \t\n,]+)+)\{/\1/t,tag,tags/
--regex-less=/^[ \t]*@media\s+([A-Za-z0-9_-]+)/\1/m,media,medias/
--regex-less=/^[ \t]*(@[A-Za-z0-9_-]+):/\1/v,variable,variables/
--regex-less=/\/\/[ \t]*(FIXME|TODO)[ \t]*\:*(.*)/\1/T,Tag,Tags/
redguardtoo / .ctags.sample
Last active Dec 21, 2020
my ~/.ctags. Please note this is configuration for Exuberant Ctags. If you use Universal Ctags, you need run `ctags --options="$HOME/.ctags" -e -R` in shell at least once and fix all the warnings.
View .ctags.sample
CMCDragonkai /
Last active Dec 10, 2020
JS: AngularJS Directive Attribute Binding Explanation

AngularJS Directive Attribute Binding Explanation

When using directives, you often need to pass parameters to the directive. This can be done in several ways. The first 3 can be used whether scope is true or false. This is still a WIP, so validate for yourself.

  1. Raw Attribute Strings

    <div my-directive="some string" another-param="another string"></div>
afgomez / validate_spanish_id.js
Last active Dec 4, 2020
Spanish DNI, CIF, NIE validator
View validate_spanish_id.js
* ValidateSpanishID. Returns the type of document and checks its validity.
* Usage:
* ValidateSpanishID( str );
* > ValidateSpanishID( '12345678Z' );
* // { type: 'dni', valid: true }
* > ValidateSpanishID( 'B83375575' );
iambibhas / scopes.txt
Last active Nov 11, 2020
Sublime Text 2: Snippet scopes
View scopes.txt
Here is a list of scopes to use in Sublime Text 2 snippets -
ActionScript: source.actionscript.2
AppleScript: source.applescript
ASP: source.asp
Batch FIle: source.dosbatch
C#: source.cs
C++: source.c++
Clojure: source.clojure
axelpale / combinations.js
Last active Jan 19, 2021
JavaScript functions to calculate combinations of elements in Array.
View combinations.js
* Copyright 2012 Akseli Palén.
* Created 2012-07-15.
* Licensed under the MIT license.
* <license>
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files
* (the "Software"), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge,
kares / jquery.parseparams.js
Created May 5, 2011
jQuery.parseParams - parse query string paramaters into an object
View jquery.parseparams.js
* $.parseParams - parse query string paramaters into an object.
(function($) {
var re = /([^&=]+)=?([^&]*)/g;
var decodeRE = /\+/g; // Regex for replacing addition symbol with a space
var decode = function (str) {return decodeURIComponent( str.replace(decodeRE, " ") );};
$.parseParams = function(query) {
var params = {}, e;
while ( e = re.exec(query) ) {