Skip to content

Instantly share code, notes, and snippets.

View macgile's full-sized avatar

macgile macgile

  • Développeur
  • france
View GitHub Profile
@macgile
macgile / LS.Extensions.cs
Created October 26, 2015 18:05 — forked from zplume/LS.Extensions.cs
A collection of extension methods both for general .NET and SharePoint 2010/2013 specific usage
using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using System.Web.UI;
using System.Xml; // requires System.Xml reference
using System.Xml.Linq; // requires System.Xml.Linq reference
@macgile
macgile / Page.asp
Created October 26, 2012 09:20 — forked from joseph-montanez/Page.asp
ASP Classic example of REST / JSON call
<%@ Language="VBScript" %>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title></title>
</head>
<body>
<!--#include file="json.asp"-->
<%
@macgile
macgile / bootstrap.html
Created October 9, 2012 18:23 — forked from tfausak/bootstrap.html
Shows Twitter Bootstrap's native support for uncollapsible dropdowns in versions >= 2.0.3.
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/bootstrap-responsive.min.css" rel="stylesheet">
<title>Bootstrap >= 2.0.3</title>
@macgile
macgile / file12312
Created October 5, 2012 17:46
Manual HTML typing+autocomplete VS ZenCoding HTML typing
<!-- ZenCoding -->
(header.page-header>(.top-line>li*5>a)+hgroup>h1+h4)+(section.content>.column>article>img+header.entry-title+(.entry-content>p)+footer.entry-footer>p)*2+(aside>(section.links>li*8>a)+(section.quote>p))+(footer.page-footer>(section.about-author>img+p>a)+(section.page-copyright>p))
<!-- end ZenCoding -->
<!-- Manual typing + autocomplete -->
<header class="page-header">
<div class="top-line">
@macgile
macgile / simily-zenco-js
Created October 5, 2012 17:44 — forked from dievardump/simily-zenco-js
simily Zencoding Template Engine
var template = '(div[id=menu, class={menu.menuclass}]>ul>li[class={menu.itemclass}, html={title}, map={menu.items}])+(div[class=body]>div[class=content]>p[html={maincontent}])',
data = {
maincontent: 'foo bar',
menu: {
menuclass: 'menu',
itemclass: 'menu-item',
items: [
{ title: 'first entry' },
{ title: 'second entry' },
{ title: 'third entry' },
@macgile
macgile / gist:3841236
Created October 5, 2012 17:42 — forked from hileon/gist:2212834
ZenCoding Cheatsheet

syntax

  • ID and CLASS attributes: div*page.section.main.
  • Custom attributes: div[title], a[title="Hello world" rel], td[colspan=2].
  • Element multiplication: li*5 will output <li> tag five times.
  • Item numbering with $ character: li.item$*3 will output <li> tag three times, replacing $ character with item number.
  • Multiple $ characters in a row are used as '''zero padding''', i.e.: li.item$$$li.item001
  • Abbreviation groups with unlimited nesting: div*page>(div*header>ul*nav>li*4>a)+(div*page>(h1>span)+p*2)+div*footer. You can literally write a full document markup with just a single line. *Filters support div tag name can be omitted when writing element starting from ID or CLASS: *content>.section is the same as div*content>div.section.
  • (v0.7) Text support: p>{Click }+a{here}+{ to continue}.