This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.
To capture the video (filesize: 19MB), using the free "QuickTime Player" application:
#!/bin/bash | |
# | |
# Watch current directory (recursively) for file changes, and execute | |
# a command when a file or directory is created, modified or deleted. | |
# | |
# Written by: Senko Rasic <[email protected]> | |
# | |
# Requires Linux, bash and inotifywait (from inotify-tools package). | |
# | |
# To avoid executing the command multiple times when a sequence of |
class UpgradeToRefineryTwo < ActiveRecord::Migration | |
def self.up | |
# For refinerycms-authentication | |
rename_table :roles_users, :refinery_roles_users | |
rename_table :roles, :refinery_roles | |
rename_table :user_plugins, :refinery_user_plugins | |
rename_table :users, :refinery_users | |
remove_column :refinery_users, :persistence_token | |
remove_column :refinery_users, :perishable_token | |
remove_column :refinery_users, :remember_token |
/* If you've ever had the need to link directly to an open modal window with Bootstrap, here's a quick and easy way to do it: | |
Make sure your modal has an id: | |
<div class="modal" id="myModal" ... > | |
Then stick this bit of Javascript at at the end of your document: | |
*/ | |
$(document).ready(function() { |
/** | |
* EXAMPLE FEATURE UPDATE | |
* Enable and revert the my_new_feature_name feature. | |
*/ | |
function example_update_7001() { | |
// An array of new or changed features; the array keys are feature names, | |
// values are an array of exportable types as seen in a feature's .info file: | |
// features[field][] = node-page-body | |
$features = array( | |
'my_new_feature_name' => array('field', 'variable'), |
; Drush Makefile for Drupal | |
; Wysiwyg with CKEditor 4.0.1 | |
projects[wysiwyg][version] = 2.2 | |
projects[wysiwyg][patch][1853550] = http://drupal.org/files/wyiwyg-support_v4_ckeditor-1853550-42.patch | |
libraries[ckeditor][download][type] = file | |
libraries[ckeditor][download][url] = http://download.cksource.com/CKEditor/CKEditor/CKEditor%204.0.1/ckeditor_4.0.1_full.zip | |
libraries[ckeditor][download][md5] = d47c37acf2d03ffe6ad39f55e00b099b |
<?php | |
/** | |
* @Given /^I am viewing a product with the following related products:$/ | |
*/ | |
public function assertRelatedProducts(TableNode $relatedProducts) { | |
// First, create a product. | |
$product = (object) array( | |
'title' => 'Parent Product', | |
'type' => 'product', | |
'uid' => 1, |
In the past four years, I've learned the hard way about how painful it can be to try and update a codebase used by a large number of applications. Changes that seem innocent can break a specific use case that wasn't anticipated. Do enough manual regression testing and you will catch the bugs, but it's' costly and time consuming process. When things are costly and time consuming, they usually stop being done.
This is why I focus a lot of my efforts towards build process automation. Computers are fantastic about doing boring, repetitive work and never complaining. If you can get them to do the boring chores for you, you spend more time doing the fun, challenging work.
UI Regression testing is one of those spots where I'm looking for automation scripts to take over. Not only because playing "spot the difference" between your builds is boring, but also because [we're horrible at it](http://en.wikipedia.org/wiki/Chan
/** | |
* Move all data in one field to another. | |
* In the example below we replace a multi cardinality field (field_old_field) | |
* with a single cardinality field (field_new_field). | |
* The data in the first element of the old field becomes the only data in the new field. | |
* | |
* @requires entity module | |
*/ | |
function mymodule_update_7001(&$sandbox) { | |
if (!isset($sandbox['progress'])) { |
var deleteAllGroupMembers = (function () { | |
var deleteAllGroupMembers = {}; | |
// the facebook ids of the users that will not be removed. | |
// IMPORTANT: add your own facebook id here so that the script will not remove yourself! | |
var excludedFbIds = ['1234','11223344']; // make sure each id is a string! | |
var usersToDeleteQueue = []; | |
var scriptEnabled = false; | |
var processing = false; | |
deleteAllGroupMembers.start = function() { |