Skip to content

Instantly share code, notes, and snippets.

View sixones's full-sized avatar
🦖

Adam Livesley sixones

🦖
View GitHub Profile
<% if respect_my_authority?('dashboard/routes') %>
<li><a href="<%= resource(:routes) %>">Routes</a></li>
<% end %>
# In Jekyll core...
module Jekyll
module Filters
module Custom
class << self
attr_accessor :extensions
end
@@extensions = []
@sixones
sixones / gist:77982
Created March 12, 2009 09:59
Liquid Cheatsheet
Liquid for Mephisto Cheatsheet
Compiled by Lee Leonard
Version 0.2 - 31 Jan 2007 (liquid 1.5.0; Mephisto 0.7.3)
This is a second draft -- corrections and suggestions are even more
encouraged. Send them to <l...@tempestprod.com>.
Basic Syntax
{{ (variable | string) ['|' filter1 ['|' filter2...]] }}
{% controltag %} [..] {% endcontroltag %}
h3. Custom Filters
Jekyll can use custom liquid filters for the rendering of your site, these
can be created in the same way as standard liquid filters. Before a filter
will work through Jekyll you need to include the filter module:
include Jekyll::Filters::Custom
Filters are expected inside a <code>_filters</code> directory at the root of
your source directory.
<?xml version="1.1" encoding="UTF-8"?>
<smil xmlns="http://www.w3.org/2008/SMIL30/" xml:lang="en">
<head>
<title>Videojuicer Player v3 - With SMIL 3.0</title>
<author>Videojuicer</author>
<abstract>Development SMIL 3.0 document for the new Videojuicer Player.</abstract>
<copyright>Videojuicer</copyright>
<meta name="datasource" content="next_meta.xml" />
/**
* The MIT License
*
* Copyright (c) 2009 Adam Livesley
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
// create an instance of the FirebugConsole
var firebug:FirebugConsole = new FirebugConsole();
// send a log message
firebug.log("Log Message");
// send an error message
firebug.error("Error Message");
module Sixones
module Github
include Jekyll::Filters::Custom
def gist(id)
"<script type=\"text/javascript\"
src=\"http://gist.github.com/#{id}.js\"></script>"
end
end
end
//
// Copyright (c) 2009, the Open Video Player authors. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
#include "mtphandler.h"
bool MTPHandler::__LIBMTPInitialised = false;
MTPHandler::MTPHandler()
: _mtpDevices(0), _connectedDevice(0), _deviceConnected(false)
{
if (!MTPHandler::__LIBMTPInitialised)
{
LIBMTP_Init();