Skip to content

Instantly share code, notes, and snippets.

View jmfayard's full-sized avatar

Jean-Michel Fayard jmfayard

View GitHub Profile
@jmfayard
jmfayard / javascript_resources.md
Created May 9, 2014 22:35 — forked from jookyboi/javascript_resources.md
Here are a set of libraries, plugins and guides which may be useful to your Javascript coding.

Libraries

  • jQuery - The de-facto library for the modern age. It makes things like HTML document traversal and manipulation, event handling, animation, and Ajax much simpler with an easy-to-use API that works across a multitude of browsers.
  • Backbone - Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and connects it all to your existing API over a RESTful JSON interface.
  • AngularJS - Conventions based MVC framework for HTML5 apps.
  • Underscore - Underscore is a utility-belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects.
  • lawnchair - Key/value store adapter for indexdb, localStorage
@jmfayard
jmfayard / rails_resources.md
Created May 9, 2014 22:35 — forked from jookyboi/rails_resources.md
Rails-related Gems and guides to accelerate your web project.

Gems

  • Bundler - Bundler maintains a consistent environment for ruby applications. It tracks an application's code and the rubygems it needs to run, so that an application will always have the exact gems (and versions) that it needs to run.
  • rabl - General ruby templating with json, bson, xml, plist and msgpack support
  • Thin - Very fast and lightweight Ruby web server
  • Unicorn - Unicorn is an HTTP server for Rack applications designed to only serve fast clients on low-latency, high-bandwidth connections and take advantage of features in Unix/Unix-like kernels.
  • SimpleCov - SimpleCov is a code coverage analysis tool for Ruby 1.9.
  • Zeus - Zeus preloads your Rails app so that your normal development tasks such as console, server, generate, and specs/tests take less than one second.
  • [factory_girl](h
@jmfayard
jmfayard / css_resources.md
Created May 9, 2014 22:35 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@jmfayard
jmfayard / brew-session.sh
Created January 12, 2015 14:52
brew, install an older version
# Say you want to install spring-roo v1.2.4
# $ brew install spring-roo
# would install version 1.3.0
# fortunately, brew is based on git
$ cd /usr/local/Library/Formula/
$ head spring-roo.rb
# this is the formula for the current version
$ git log --abbrev-commit --pretty=oneline spring-roo.rb
@jmfayard
jmfayard / jmfayard.xml
Created February 2, 2015 17:01
intellij14 live templates
<templateSet group="jmfayard">
<template name="key" value="private static final String KEY_$value$ = &quot;$value$&quot;;" description="Key for a bundle" toReformat="false" toShortenFQNames="true">
<variable name="value" expression="" defaultValue="" alwaysStopAt="true" />
<context>
<option name="JAVA_DECLARATION" value="true" />
</context>
</template>
<template name="logd" value="private final org.apache.log4j.Logger _log = org.apache.log4j.Logger.getLogger(&quot;$class$&quot;);" description="Declaration with log4j" toReformat="true" toShortenFQNames="true">
<variable name="class" expression="className()" defaultValue="" alwaysStopAt="true" />
<context>
@jmfayard
jmfayard / immobilienscout24.html
Created February 3, 2015 20:02
immobilienscout24
<div class="grid-item desk-one-fourth lap-one-third palm-one-whole">
<figure class="one-whole border border-darkblue shortlist-item" data-bind="event: { mouseout: $root.entries.mouseout, mouseover: $root.entries.mouseover}">
<div class="shortlist-item--header show-status__buttons" data-bind="css: {'show-status__buttons': (entry.hasStatusButtons), 'show-status__buttons_by_default': (entry.hasStatusButtons &amp;&amp; entry.showTooltip)}">
<figcaption class="padding-xs" data-bind="css: entry.realEstate.state == 'ACTIVE' ? '' : 'inactive' ">
<div>
<h3 class="font-white margin-bottom-none padding-xs"><span data-bind="css: entry.tag.icon" class="fa font-xl margin-right-s fa-star"></span><!--ko text: entry.tag.label-->Gemerkt<!--/ko--></h3>
</div>
</figcaption>
<div class="overflow-hidden shortlist-item--image__wrapper" style="height:170px;">
<!-- ko if: tag.date -->
// Standard android variant of https://gist.github.com/jmfayard/2f7b4e7d29f76f6d4999
open class MyActivity : Activity() {
val sdkXYZ : DummyClass
val otherFeature: DummyClass
override fun onCreate() {
super.onCreate()
package LifecycleDemo
import java.util.*
/**
* The purpose of this pattern is to give the ability to group actions that belong together
* but that have to be executed at a different point of the android activity lifecycle
*
* This extension function creates a delegate for all children of LifecycleActivity

Chère madame, cher monsieur,

Je ne vous cache pas que j’ai des choses à vous dire à propos de votre site que vous pourrez trouver sur le moment assez désagréable.

Je vous contacte à la fois

  • en mon nom propre parce que je trouve sincèrement que votre site est intéressant et utile (le simple fait que je vous contacte vous parmi les 700 millions et quelques de sites en activité devrait suffir pour vous en convaincre)
  • et en tant que l'un des nombreux volontaires du site participatif tosdr.org qui s'est fixé comme objectif de synthétiser et rendre plus facile d'accès aux internautes "normaux" les termes de services qu'ils sont censés avoir "lus et approuvés".
package adventofcode.day7
import java.io.File
import java.util.*
import kotlin.text.Regex
/***
* Day of Code 7
*
* See http://adventofcode.com/day/7