Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
################################
#!# SiteId=behat_whole_suite_m
#!# OutputFormat=moodle_progress,junit
################################
# Optional Params.
if [ -z "${BehatProfileToUseOnDay}" ]; then
BehatProfileToUseOnDay="default default default default default default default"
fi
if [ -z "${SELENIUMPORT}" ]; then
@JamesMGreene
JamesMGreene / gitflow-breakdown.md
Last active April 30, 2024 14:11
`git flow` vs. `git`: A comparison of using `git flow` commands versus raw `git` commands.

Initialize

gitflow git
git flow init git init
  git commit --allow-empty -m "Initial commit"
  git checkout -b develop master

Connect to the remote repository

@duggan
duggan / check.php
Last active July 24, 2017 07:16
Get latest versions of a list of PHP PECL extensions
<?php
/*
* Usage:
* $ php check.php --extensions="apc memcached redis"
* apc: 3.1.13
* memcached: 2.2.0
* redis: 2.2.5
*/
class PHPExtensionUpdates {
@P7h
P7h / jdk_download.sh
Last active February 20, 2024 11:29
Script to download JDK / JRE / Java binaries from Oracle website from terminal / shell / command line / command prompt
##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### ##### #####
### Shell script to download Oracle JDK / JRE / Java binaries from Oracle website using terminal / command / shell prompt using wget.
### You can download all the binaries one-shot by just giving the BASE_URL.
### Script might be useful if you need Oracle JDK on Amazon EC2 env.
### Script is updated for every JDK release.
### Features:-
# 1. Resumes a broken / interrupted [previous] download, if any.
# 2. Renames the file to a proper name with including platform info.
@danpoltawski
danpoltawski / simplified_behat_for_tim_hunt.md
Last active March 22, 2023 17:20
Simplified behat for Tim Hunt

Simplified behat for Tim Hunt.

Disclaimers:

  • I'm hoping this will help you understand so you can help us improve our documentation.
  • This is simplified version, i'm ignoring some details which are unimportant for discusing this.

What Behat requires.

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package org.hibernate.dialect;
import java.sql.Types;
import java.sql.Types;
import org.hibernate.Hibernate;
@allybee
allybee / target_blank.js
Last active November 7, 2023 22:40
Add target="_blank" to external links with pure JavaScript.
function targetBlank() {
// remove subdomain of current site's url and setup regex
var internal = location.host.replace("www.", "");
internal = new RegExp(internal, "i");
var a = document.getElementsByTagName('a'); // then, grab every link on the page
for (var i = 0; i < a.length; i++) {
var href = a[i].host; // set the host of each link
if( !internal.test(href) ) { // make sure the href doesn't contain current site's host
a[i].setAttribute('target', '_blank'); // if it doesn't, set attributes
@vgrichina
vgrichina / SQLServerDialect.java
Created November 3, 2009 22:51
Improved MSSQL dialect for Hibernate (using more appropriate data types)
/*
* Copyright © 2009, Componentix. All rights reserved.
*/
package com.componentix.hibernate.dialect;
import java.sql.Types;
/**
* A proper dialect for Microsoft SQL Server 2000 and 2005.