Skip to content

Instantly share code, notes, and snippets.

View sarahg's full-sized avatar
🏂

Sarah German sarahg

🏂
View GitHub Profile
@franciscoj
franciscoj / flowplayer_on_fancybox.html
Created September 9, 2010 09:22
How to include a flowplayer video inside a fancybox modal window
<!-- Don't forget to include flowplayer js and fancybox js and css -->
<div style="width:665px;height:480px;display:none;" id="player">
</div>
<a id="play-flv-video" href="#player">Play video</a>
<script language="JavaScript">
$(document).ready(function() {
$("a#play-flv-video").fancybox({
@putermancer
putermancer / gist:591964
Created September 22, 2010 16:01
Set up a local solr instance on mac
# Setting up a local solr instance on a mac
# install solr with homebrew
brew install solr
# create the base solr index directory
mkdir -p /data/solr
# make sure you can write to the solr logs
sudo chown -R `whoami` /usr/local/Cellar/solr/
IMPORTANT: this is outdated, go to https://github.com/netroy/Lockets
"npm install socket-io" & you are ready to go
@foogoof
foogoof / index.html
Created May 18, 2011 12:28
html page to tail system.log over websockets
<script src="/socket.io/socket.io.js"></script>
<script type="text/javascript">
var socket = new io.Socket();
socket.connect();
socket.on('connect',
function(){
console.log('connected');
socket.send('/var/log/system.log');
});
@imakewebthings
imakewebthings / deck.audio.js
Created February 21, 2012 03:39
Background audio for each slide in deck.js
/* Plays all audio elements inside a slide when the slide becomes active
and pauses them when the user navigates away. Replace pause with
whatever functionality desired (maybe pause and set currentTime to 0?) */
$(document).bind('deck.change', function(e, from, to) {
$.deck('getSlide', from).find('audio').each(function() {
this.pause && this.pause();
});
$.deck('getSlide', to).find('audio').each(function() {
this.play && this.play();
});
@luetkemj
luetkemj / wp-query-ref.php
Last active May 25, 2024 10:56
WP: Query $args
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.github.io
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php
*/
@adamgoucher
adamgoucher / webdriver_video.py
Created April 7, 2012 04:27
a basic example of using webdriver with html 5's video tag
# Copyright 2008-2009 WebDriver committers
# Copyright 2008-2009 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@olleolleolle
olleolleolle / image_assist_fix.php
Created June 5, 2012 14:51
PHP script to convert Image Assist Tag into HTML tags
<?php
/**
* PHP script to convert Image Assist Tag into HTML tags.
*
* Drupal 6-to-7 conversion
*
* This script must be run on D7 database (after the update from D6 to D7).
* http://drupal.org/node/841568
*/
@eric1234
eric1234 / README.md
Last active May 2, 2024 08:26
Protect page with simple password

Purpose

Unauthorized access to a PHP page prompts the user for a password. Once the password is entered the original page will show.

Features

  • The access is recorded in the session so it only needs to be
<?php
/**
* @file
* Default theme implementation to display the basic html structure of a single
* Drupal page.
*
* Variables:
* - $css: An array of CSS files for the current page.
* - $language: (object) The language the site is being displayed in.