This file contains 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
<?php foreach (c::get('lang.available') as $lang): ?> | |
<a<?php if($lang == c::get('lang.current')) echo ' class="active"' ?> href="<?php echo url($page->uid(), $lang) ?>"> | |
<img src="<?php echo url('assets/images/flags/' . $lang . '.png') ?>" alt="" /><?php echo $lang ?> | |
</a> | |
<?php endforeach ?> |
This file contains 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
<ul class="flags"> | |
<?php foreach($site->languages() as $lang): ?> | |
<li class="flag"><a href="<?php echo $page->url($lang->code()) ?>"> | |
<img src="<?php echo url('assets/images/flags/24/' . $lang . '.png') ?>"></a> | |
</li> | |
<?php endforeach ?> | |
</ul> |
This file contains 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
// Block Grid | |
// Technique adapted from Foundation 5 for Bootstrap 3. | |
// https://github.com/zurb/foundation/blob/f755d8704123f86c281ede0b171881e2672f150d/scss/foundation/components/_block-grid.scss | |
// Original LESS Version by Christopher Mitchell (https://gist.github.com/ChrisTM) | |
// Converted to SCSS by Rasmus Jürs (https://github.com/Jursdotme) | |
[class*="block-grid-"] { | |
display: block; | |
margin: -($grid-gutter-width/2); | |
padding: 0; |
This file contains 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
@import "colors"; | |
@import "buttons.scss"; | |
@import "compass/css3"; | |
@mixin tabs { | |
float: left; | |
width: 100%; | |
background: transparent; | |
margin: 0!important; | |
height: 43px; |
This file contains 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
################## | |
# Golden Section # | |
################## | |
# Set default values for screen padding | |
kwmc config padding top 33 | |
kwmc config padding bottom 10 | |
kwmc config padding left 10 | |
kwmc config padding right 10 |
This file contains 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
#!/bin/bash | |
# | |
# Open new Terminal tabs from the command line | |
# | |
# Author: Justin Hileman (http://justinhileman.com) | |
# | |
# Installation: | |
# Add the following function to your `.bashrc` or `.bash_profile`, | |
# or save it somewhere (e.g. `~/.tab.bash`) and source it in `.bashrc` | |
# |
This file contains 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
-- Switch windows to next space at left or right | |
function moveWindowOneSpace(direction) | |
_mouseOrigin = hs.mouse.getAbsolutePosition() | |
local win = hs.window.focusedWindow() | |
_clickPoint = win:zoomButtonRect() | |
_clickPoint.x = _clickPoint.x + _clickPoint.w + 5 | |
_clickPoint.y = _clickPoint.y + (_clickPoint.h / 2) | |
local mouseClickEvent = hs.eventtap.event.newMouseEvent(hs.eventtap.event.types.leftmousedown, _clickPoint) |
This file contains 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
####### Keybinds ####### | |
# Set prefix for Kwms hotkeys | |
kwmc config prefix-key ctrl+alt+cmd+shift-a | |
# Set space key | |
kwmc config spaces-key ctrl | |
# Prefix is not applied globally | |
kwmc config prefix-global off |
This file contains 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
$(function(){ | |
$('#maximage').maximage({ | |
cycleOptions: { | |
fx: 'fade', | |
speed: 1000, // Has to match the speed for CSS transitions in jQuery.maximage.css (lines 30 - 33) | |
timeout: 5000, | |
prev: '#arrow_left', | |
next: '#arrow_right', | |
pause: 0, | |
before: function(last,current){ |
This file contains 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
""" | |
An attempt to make a safe evaluator of a subset of Python expressions. | |
This is mostly a proof-of-concept for getting feedback, it has not been | |
thoroughly checked for safety, use at your own risk :) | |
It uses the Python ast module to parse the expression, but all evaluation is | |
done by walking the ast, it is not directly executed by the Python runtime. | |
Nosetests are provided below including coverage of supported and unsupported |
OlderNewer