Skip to content

Instantly share code, notes, and snippets.

View edinsoncs's full-sized avatar
🤖
Working from home

Edinson CS edinsoncs

🤖
Working from home
View GitHub Profile
@kant
kant / jquery.timeago.spanish.js
Created November 5, 2008 03:22
Spanish override examples for the timeago jQuery plugin (http://timeago.yarp.com)
jQuery.timeago.settings.strings = {
suffixAgo: "apenas un momento atrás",
suffixFromNow: "a partir de ahora",
seconds: "menos de um minuto",
minute: "cerca de um minuto atrás",
minutes: "hace unos %d minutos atrás",
hour: "cerca de una hora",
hours: "cerca de %d horas",
day: "un día",
days: "%d días",
@joemccann
joemccann / nginx + node setup.md
Created October 25, 2010 02:06
Set up nginx as a reverse proxy to node.js.

The idea is to have nginx installed and node installed. I will extend this gist to include how to install those as well, but at the moment, the following assumes you have nginx 0.7.62 and node 0.2.3 installed on a Linux distro (I used Ubuntu).

In a nutshell,

  1. nginx is used to serve static files (css, js, images, etc.)
  2. node serves all the "dynamic" stuff.

So for example, www.foo.com request comes and your css, js, and images get served thru nginx while everything else (the request for say index.html or "/") gets served through node.

  1. nginx listens on port 80.
/* http://meyerweb.com/eric/tools/css/reset/
v2.0 | 20110126
License: none (public domain)
*/
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
@chriseppstein
chriseppstein / 0_selector_hacks.scss
Created September 14, 2011 04:27
This gist demonstrates some uses of the new sass feature: Passing content blocks to mixins.
@mixin ie6 { * html & { @content } }
#logo {
background-image: url("/images/logo.png");
@include ie6 { background-image: url("/images/logo.gif"); }
}
@coolaj86
coolaj86 / how-to-publish-to-npm.md
Last active July 25, 2024 03:38
How to publish packages to NPM

Getting Started with NPM (as a developer)

As easy as 1, 2, 3!

Updated:

  • Aug, 08, 2022 update config docs for npm 8+
  • Jul 27, 2021 add private scopes
  • Jul 22, 2021 add dist tags
  • Jun 20, 2021 update for --access=public
  • Sep 07, 2020 update docs for npm version
/* Sass con sintaxis .sass */
/* Variables */
$azul: #3bbfce /* Guardamos una variable llamada azul con el color #3bbfce */
$blanco: #fff
/* este es un elemento con class content-navigation */
.content-navigation
border-color: $blue /* Noten el espacio y la falta de llaves */
color: darken($blue, 9%) /* darken es una funcion utilitaria que viene en Sass, hace un color mas oscuro */
p
@bidulock
bidulock / zendesk-chat-notifications.user.js
Last active December 20, 2017 13:10
A basic user script to enable html5 notifications on zendesk sites when there are incoming chat requests
// ==UserScript==
// @name Desktop Notifications for zendesk
// @include https://*.zendesk.com/agent/*
// ==/UserScript==
setTimeout(function () {
var initNotifications = window.webkitNotifications ? function () {
var notify = window.webkitNotifications;
var n = null;
@spoeken
spoeken / Accurate Human Logical Time Difference Javascript Function
Last active July 2, 2024 12:18
A time difference function in javascript, logical to humans. Outputs the difference of two dates in years, months, days, hours, minutes and seconds.
// Time difference function
function timeDiff(start, end) {
//today, now!
//Get the diff
var diff = end - start;
//Create numbers for dividing to get hour, minute and second diff
var units = [
1000 * 60 * 60 *24,
1000 * 60 * 60,
1000 * 60,
@jareware
jareware / SCSS.md
Last active July 1, 2024 09:25
Advanced SCSS, or, 16 cool things you may not have known your stylesheets could do

⇐ back to the gist-blog at jrw.fi

Advanced SCSS

Or, 16 cool things you may not have known your stylesheets could do. I'd rather have kept it to a nice round number like 10, but they just kept coming. Sorry.

I've been using SCSS/SASS for most of my styling work since 2009, and I'm a huge fan of Compass (by the great @chriseppstein). It really helped many of us through the darkest cross-browser crap. Even though browsers are increasingly playing nice with CSS, another problem has become very topical: managing the complexity in stylesheets as our in-browser apps get larger and larger. SCSS is an indispensable tool for dealing with this.

This isn't an introduction to the language by a long shot; many things probably won't make sense unless you have some SCSS under your belt already. That said, if you're not yet comfy with the basics, check out the aweso

http://principiante-linux.blogspot.com/2007/08/comandos-linux-mover-copiar-borrar-y.html
Listar todos los archivos (excepto los ocultos) del directorio actual, en formato detallado.
ls -l
Listar los archivos del directorio actual, indicando el tipo de archivo.
ls -F
Listar todos los archivos (incluyendo los ocultos) del directorio actual, en formato detallado y presentarlo en columnas.
ls -laC