Skip to content

Instantly share code, notes, and snippets.

View q0rban's full-sized avatar
👋

James Sansbury q0rban

👋
View GitHub Profile
<?
// So at the top of the node--article.tpl.php there's this
$view = 'related_bits';
$display = 'block';
$related_bits_block = views_embed_view($view, $display);
// Then down within the actual page markup stuff there's this
<?php if (isset($related_bits_block) && $related_bits_block): ?>
select g.destid1, i.destid1 from kaltura_gallery_entries k1 right join migrate_map_gallery g on k1.gid = g.sourceid1 right join migrate_map_galleryitem i on k1.kid = i.sourceid1 where k1.kaltura_order=(select min(k2.kaltura_order) from kaltura_gallery_entries k2 where k1.gid = k2.gid);
@q0rban
q0rban / 01.js
Created April 10, 2012 14:43 — forked from sirkitree/01.js
Project Euler challenge #1
// Project Euler challenge #1
// https://projecteuler.net/problem=1
var ans = 0;
for (i = 1; i < 1000; i++) {
if (i % 3 === 0 || i % 5 === 0) {
ans += i;
}
}
console.log(ans);
@q0rban
q0rban / Ascii Bot
Created March 15, 2012 15:09 — forked from vordude/Ascii Bot
o
_ | _
| ◡ ◡ |
| ⏝ |
— ‾‾‾‾‾ —
| |
| | | |
This space is intentionally left blank.