Skip to content

Instantly share code, notes, and snippets.

View relaxnow's full-sized avatar

Boy Baukema relaxnow

View GitHub Profile
@lvonk
lvonk / alternative_vault.py
Last active October 15, 2015 19:05
Alternative Ansible vault.
# Copyright 2014 Zilverline B.V.
# 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
# distributed under the License is distributed on an "AS IS" BASIS,
@dergachev
dergachev / GIF-Screencast-OSX.md
Last active April 19, 2024 11:00
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@chrisjlee
chrisjlee / drush-turn-off-aggregate-assets.txt
Created September 24, 2012 17:20
drush disable js/css aggregation
// To turn on JS Aggregation
drush vset preprocess_js 1 --yes
// To clear all Cache
drush cc all
// To disable JS Aggregation
drush vset preprocess_js 0 --yes
// To clear cache of JS and CSS only
@relaxnow
relaxnow / longest-common-substring.php
Created October 10, 2011 20:53
Longest Common Substring algorithm in PHP
<?php
function getLongestCommonSubstring($first, $second)
{
$longestCommonSubstringIndexInFirst = 0;
$table = array();
$largestFound = 0;
$firstLength = strlen($first);
$secondLength = strlen($second);
@relaxnow
relaxnow / php-quine.php
Created October 10, 2011 19:41
PHP Quine
<?php
$quine = "PD9waHAKCiRxdWluZSA9ICIqIjsKCmVjaG8gc3RyX3JlcGxhY2UoY2hyKDQyKSwgJHF1aW5lLCBiYXNlNjRfZGVjb2RlKCRxdWluZSkpOw==";
echo str_replace(chr(42), $quine, base64_decode($quine));