Skip to content

Instantly share code, notes, and snippets.

View jmfayard's full-sized avatar

Jean-Michel Fayard jmfayard

View GitHub Profile
@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 -->
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
// 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 adventofcode.day7
import java.io.File
import java.util.*
import kotlin.text.Regex
/***
* Day of Code 7
*
* See http://adventofcode.com/day/7
@jmfayard
jmfayard / bash_config
Created January 7, 2016 09:53
old things in bash config
android_screenshot() {
adb devices
adb shell screencap -p | perl -pe 's/\x0D\x0A/\x0A/g' > "$DESKTOPFOLDER/androidscreenshot-$(filetimestamp).png"
open "$DESKTOPFOLDER"
}
android_jmrecordscreencast() {
adb devices
echo "Press Ctrl-C to stop screencast"
echo "then type: $ android_pullscreencast"
echo
@jmfayard
jmfayard / view.js
Created February 27, 2017 09:00
Bacbone : old & new
define([
"underscore",
"backbone",
"util",
"modules/views/customerprofile"
], function (_, Backbone, util, CustomerProfile) {
return Backbone.View.extend(
{
This file has been truncated, but you can view the full file.
s-1/files-1.1/appcompat-v7-27.0.1.aar/7ba3710c45b362d9a78f7a570a7d2f42/res/drawable-ldrtl-xhdpi-v17/abc_ic_menu_copy_mtrl_am_alpha.png, to=/Users/jmfayard/Dev/mautinoa/android-kotlin-magellan/build/intermediates/res/merged/debug},
future=com.google.common.util.concurrent.SettableFuture@15708be8}
AAPT1 err(Facade for 176707604): Done -> QueuedJob{
title=Compiling design_fab_background.xml,
task={from=/Users/jmfayard/.gradle/caches/transforms-1/files-1.1/design-27.0.1.aar/589e4bbc3ce5596a8ebdb36e7968e485/res/drawable/design_fab_background.xml, to=/Users/jmfayard/Dev/mautinoa/android-kotlin-magellan/build/intermediates/res/merged/debug},
future=com.google.common.util.concurrent.SettableFuture@70cbcf0c}
AAPT warning(1749937772), Job(QueuedJob{
title=Compiling design_layout_tab_text.xml,
task={from=/Users/jmfayard/.gradle/caches/transforms-1/files-1.1/design-27.0.1.aar/589e4bbc3ce5596a8ebdb36e7968e485/res/layout/design_layout_tab_text.xml, to=/Users/jmfayard/Dev/mautinoa/android-kotlin-magellan/build/intermedi