Skip to content

Instantly share code, notes, and snippets.

@anareyna
anareyna / gist:6337283
Created August 26, 2013 00:58
functions
var Ani = ( function() {
var st = {
txtName : '.txtName',
btnSearch : '#btnSearch'
},
dom = {},
catchDom = function() {
dom.txtName = $(st.txtName);
dom.btnSearch = $(st.btnSearch);
},
@anareyna
anareyna / gist:6400409
Created August 31, 2013 20:24
glyphicons
@font-face {
font-family: 'Glyphicons Halflings';
src: url('http://getbootstrap.com/dist/fonts/glyphicons-halflings-regular.eot');
src: url('http://getbootstrap.com/dist/fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('http://getbootstrap.com/dist/fonts/glyphicons-halflings-regular.woff') format('woff'), url('http://getbootstrap.com/dist/fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('http://getbootstrap.com/dist/fonts/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg');
}
.glyphicon {
position: relative;
top: 1px;
display: inline-block;
@anareyna
anareyna / gist:6671148
Created September 23, 2013 14:22
jade build
{
"selector": "source.jade",
"cmd": ["jade", "-P", "<$file>", "../${file_base_name}.phtml"],
//"cmd": ["jade", "-P", "<$file>", "${file_path}/${file_base_name}.phtml"],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"windows":
{
"shell":["cmd"]
}
}
@anareyna
anareyna / gist:6702491
Created September 25, 2013 16:47
demojs.sublime-snippet
<snippet>
<content><![CDATA[
var Demo = ( function() {
var st = {
container : '#container',
btnSearch : '#btnSearch'
},
dom = {},
catchDom = function() {
dom.container = \$(st.container);
@anareyna
anareyna / gist:7127770
Created October 23, 2013 22:18
placekitten snippet for sublime
<snippet>
<content><![CDATA[
http://www.placekitten.com/
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>pk</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->
<!-- <scope>source.python</scope> -->
</snippet>
@anareyna
anareyna / gist:7779437
Created December 3, 2013 23:13
share scripts (works on ie8+)
<a href="javascript:;" onclick="window.open('https://www.facebook.com/sharer/sharer.php?u=' + encodeURIComponent(location.href), 'facebooksharedialog', 'width=626,height=436');return false;" title="Comparte en Facebook" class="fb facebookButton">Comparte en Facebook</a>
<a href="https://twitter.com/share" title="Comparte en Twitter" class="tw twitterButton" target="_blank">Comparte en Twitter</a>
<script>!function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (!d.getElementById(id)) {
js = d.createElement(s);
js.id = id;
js.src = "https://platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore(js, fjs);
}
@anareyna
anareyna / style.styl
Last active December 31, 2015 04:58
tcn-yellowpages styles
colorGrey = #eee
colorEven = colorGrey
colorOdd = #fff
colorBg = #fff
mainColor = #EF8500
secondaryColor = #0058A0
colorLoginLinks = secondaryColor
colorLinks = secondaryColor
colorLinksHover = mainColor
colorMainTitle = secondaryColor
/**
Descripción del modulo yOSON
@class nombre_del_modulo
@main nombre_archivo_js_actual
@author Nombre del Autor
*/
yOSON.AppCore.addModule('nombre_del_modulo', function(Sb) {
/**
Main settings of the module(these can be overridden)
<snippet>
<content><![CDATA[
/**
* ${2:Descripción del módulo}
* @submodule ${3:nombre_del_modulo}
* @main ${1:default}
* @author ${4:Nombre del Autor}
*/
yOSON.AppCore.addModule("${3:nombre_del_modulo}", function(Sb){
@anareyna
anareyna / addCoffee.sublime-snippet
Last active May 10, 2016 19:23
Estructura de módulo en coffescript
<snippet>
<content><![CDATA[
###
${2:Module description}
@class ${1:module_name}
@main ${3:flux/account}
@author ${4:Ana Reyna}
###
yOSON.AppCore.addModule "${1:module_name}", (Sb) ->
dom = {}