This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| defmodule MacroExp do | |
| defmacro attr_accessor(atom) do | |
| getter = String.to_atom("get_#{atom}") | |
| setter = String.to_atom("set_#{atom}") | |
| quote do | |
| def unquote(getter)(data) do | |
| data |> Map.from_struct |> Map.get(unquote(atom)) | |
| end | |
| def unquote(setter)(data, value) do | |
| data |> Map.put(unquote(atom), value) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "success": true, | |
| "itemTemplates": [ | |
| { | |
| "templateId": "BADGE_BATTLE_ATTACK_WON", | |
| "badgeSettings": { | |
| "badgeType": "BADGE_BATTLE_ATTACK_WON", | |
| "badgeRank": 4, | |
| "targets": [ | |
| 10, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Setup Module with `highlight` filter | |
| */ | |
| var JekyllApp = angular.module('JekyllApp', [], function ($routeProvider, $locationProvider) { | |
| $locationProvider.html5Mode(false); | |
| }); | |
| JekyllApp.filter('highlight', function () { | |
| return function (text, filter) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var gulp = require('gulp'), | |
| concat = require('gulp-concat'), | |
| sass = require ('gulp-ruby-sass'), | |
| autoprefixer = require ('gulp-autoprefixer'), | |
| uglify = require('gulp-uglify'), | |
| imagemin = require('gulp-imagemin'), | |
| jekyll = require('gulp-jekyll'), | |
| // livereload = require('gulp-livereload'), | |
| watch = require('gulp-watch'), | |
| jshint = require("gulp-jshint"), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'use strict'; | |
| // | |
| var project = { | |
| name:'mom', | |
| url:'http://example.com', | |
| }; | |
| var repo = { | |
| url : 'git@github.com:blivesta/mom.git' | |
| }; | |
| var less = false; // less or sass = false |
NewerOlder