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 test_memory_limit() { | |
// Using drush but any arbitrary number for memory limit will do. | |
$mem_limit = drush_memory_limit(); | |
$bail_percentage = 90; | |
$big_array = []; | |
$i = 9999; | |
while (TRUE) { | |
$i++; |
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
changelog = "!f() { r=${1:-`git describe --tags --abbrev=0`..HEAD}; echo Changelog for $r; git log --reverse --no-merges --format=' * %an - %h - %s' $r; }; f" |
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
#ScriptName : spiderTestNielssen.py | |
#--------------------- | |
import unittest | |
import random | |
from selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
#Following are optional required | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.support.ui import Select |
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
#!/usr/bin/php | |
<?php | |
define('LOCK_FILE', "/var/run/".basename( $argv[0], ".php" ).".lock" ); | |
if( isLocked() ) die( "Already running.\n" ); | |
# The rest of your script goes here.... | |
require 'vendor/autoload.php'; | |
use Aws\Common\Aws; |
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
check directory nfs1 path /mnt/nfs/backups | |
start program = "/bin/bash -c '/bin/mkdir /mnt/nfs && /bin/chmod 0775 /mnt/nfs && /bin/mount /mnt/nfs'" |
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
(* set to the user of the box, ie "root" or "deployer" *) | |
set box_user to "user" | |
(* Add the hostnames or IP's of the boxes to connect to. As many as you need. *) | |
set my_boxes to {"box1", "box2", "box3"} | |
tell application "iTerm" | |
activate | |
set t to (make new terminal) | |
tell t | |
(* Loop over the boxes, create a new tab and connect. *) |
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 | |
/** | |
* @file | |
* Small snippets for making the Twitter statuses easier to work with. | |
*/ | |
function fma_twitter_views_pre_render(&$view) { | |
if ($view->name === 'fma_tweets') { | |
shuffle($view->result); | |
$view->result = array($view->result[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
####################################################################### | |
# | |
# This is the main Nginx configuration file. | |
# | |
# More information about the configuration options is available on | |
# * the English wiki - http://wiki.nginx.org/Main | |
# * the Russian documentation - http://sysoev.ru/nginx/ | |
# | |
####################################################################### |
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
<% content_for :plupload do %> | |
<%= javascript_include_tag 'jquery-ui', 'plupload/plupload.full.min', 'jquery.progressbar.min', 'json2' -%> | |
<% | |
@config = @config || CastasugarConfig.first | |
app_name = @config['application_name'].parameterize | |
@aws_config = YAML::load(File.open("#{RAILS_ROOT}/config/aws.yml")) | |
access_key_id = @aws_config['aws_key'] | |
secret_access_key = @aws_config['aws_secret'] |
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 | |
/** | |
* @file | |
* Our simpletests for the FMA install profile. | |
* @copyright Copyright(c) 2012 Previous Next Pty Ltd | |
* @license GPL v2 http://www.fsf.org/licensing/licenses/gpl.html | |
* @author Christian Biggins christian at previousnext dot com dot au | |
*/ | |
class FMATestCase extends DrupalWebTestCase { |
NewerOlder