Skip to content

Instantly share code, notes, and snippets.

@mrmartineau
mrmartineau / stimulus.md
Last active April 19, 2024 09:41
Stimulus cheatsheet
@carlosble
carlosble / jsdaycan2017_js_engancha_resumen.md
Last active April 7, 2020 22:08
Por que JavaScript engancha, #JSDayCAN2017
  • Historia:

    • Eich escribió el primer prototipo de JS en 10 dias en Mayo de 1995
    • Creado en poco tiempo, sin restricciones, como en Java las Checked Exceptions o en C# los metodos finales.
    • JavaScript Jabber Podcast con Brendan Eich: https://devchat.tv/js-jabber/124-jsj-the-origin-of-javascript-with-brendan-eich
    • Aprender JavaScript me obligó a estudiar. Kudos a Pasku por la cantidad de recursos que me pasó.
    • Scheme: Higher-order functions o functors, lexical scoping
    • Lo mejor es su flexibilidad, es multiparadigma
  • Douglas Crockford Lectures on JavasScript:

#!/bin/bash
count=`git tag -l | wc -l`
keep=20
num=0
for t in `git tag -l --sort=taggerdate`
do
if [ "$num" -ge `expr $count - $keep` ]
then
@ademers
ademers / craft-cms-language-toggle.html
Last active October 17, 2017 11:49
Craft CMS: Language Toggle
{# Language switcher #}
{# Loop through all of the site locales, except the current one #}
{% set otherLocales = craft.i18n.getSiteLocaleIds()|without(craft.locale) %}
{% for locale in otherLocales %}
{# Is this an entry page? #}
{% if entry is defined %}
{# Find the current entry in the other locale #}
{% set localeEntry = craft.entries.id(entry.id).locale(locale).first %}
@vladimirtsyupko
vladimirtsyupko / gist:10964772
Created April 17, 2014 08:32
Git force pull to overwrite local files
git fetch --all
git reset --hard origin/master
git pull origin master
@brianlow
brianlow / FindConflictingReferences.cs
Created January 3, 2012 03:04
Find conflicting assembly references
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using NUnit.Framework;
namespace MyProject
{
[TestFixture]