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
public void drupalNodeCollectionXmlValidationWithContents() | |
throws IOException, DocumentException, InterruptedException { | |
DrupalGenerateContentsPage page = PageFactory.initElements(driver, | |
DrupalGenerateContentsPage.class); | |
page.open(drupalUrl); | |
page.unselectAllTypeCheckboxes(); | |
page.selectCheckbox("node_types[node_test]"); | |
page.selectCheckbox("kill_content"); | |
page.setNumNodes(10); | |
page.setNodesNow(); |
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
import java.util.Properties; | |
import es.juntadeandalucia.icms.data.AbstractCollectionMetadata; | |
import es.juntadeandalucia.icms.exceptions.ICMSException; | |
import groovy.util.ConfigObject; | |
public class OpenCmsCollectionMetadata extends AbstractCollectionMetadata<OpenCmsResourceMetadataCollection, OpenCmsResourceMetadata> { | |
final static String STRUCTURED_CONTENT_CONFIG_STRING = "structured_content_type"; | |
public OpenCmsCollectionMetadata(final String providerId, final String id, final ConfigObject config) throws ICMSException { |
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
;;; Color theme based on Tango Palette. Created by [email protected] | |
(defun color-theme-tango () | |
"A color theme based on Tango Palette." | |
(interactive) | |
(color-theme-install | |
'(color-theme-tango | |
((background-color . "#2e3436") | |
(background-mode . dark) | |
(border-color . "#888a85") | |
(cursor-color . "#ffffff") |
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/env ruby | |
EXTERNAL_SCREEN = 'VGA1' | |
LAPTOP_SCREEN = 'LVDS1' | |
def use_external_screen | |
system "xrandr --output #{EXTERNAL_SCREEN} --auto && xrandr --output #{LAPTOP_SCREEN} --off" | |
end | |
def use_laptop_screen |
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
Test Code: | |
package es.juntadeandalucia.icms.server.cache; | |
import static org.mockito.Matchers.any; | |
import static org.mockito.Mockito.spy; | |
import static org.mockito.Mockito.verify; | |
import static org.mockito.internal.verification.VerificationModeFactory.atLeastOnce; | |
import static org.mockito.internal.verification.VerificationModeFactory.times; |
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
def equi ( a ) | |
return -1 if (a.nil? || a.empty?) | |
lower_sum = 0 | |
higher_sum = 0 | |
a.each { |x| higher_sum += x } | |
a.each_index do |p| | |
lower_sum += a[p-1] if p!=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
/** | |
* Returns the value of key as a String list. For example, it would return | |
* my_property = [ "first_element", "second_element" ] | |
* as new ArrayList<String>(){{ add("first_element"); add("second_element") }}; | |
* @param key The key to return | |
* @return The List of values | |
*/ | |
public static List<String> getList(String key) { | |
final List<String> result = new ArrayList<String>(); | |
String rawString = getConfig(key); |
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
def wottam | |
3.times { puts "AWESOME!" } | |
end |
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
#!/bin/sh | |
branch=$1 | |
test -z $branch && echo "branch required." 1>&2 && exit 1 | |
git checkout master | |
git merge $branch | |
git push origin master | |
git push origin :$branch |
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
build_package_combined_patch() { | |
local package_name="$1" | |
{ | |
curl https://raw.github.com/gist/3721565/falcon.patch | patch -p1 | |
autoconf | |
./configure --prefix="$PREFIX_PATH" $CONFIGURE_OPTS | |
make -j 8 | |
make install | |
} >&4 2>&1 |
OlderNewer