Skip to content

Instantly share code, notes, and snippets.

View daveferrara1's full-sized avatar

Dave Ferrara daveferrara1

  • United States
View GitHub Profile
@guilouro
guilouro / clone_bitbucket_docker.txt
Last active November 9, 2021 16:22
Clone bitbucket private repo in Dockerfile
FROM ubuntu
MAINTAINER Guilherme Louro "guipclouro@gmail.com"
# Update aptitude with new repo
RUN apt-get update
# Install software
RUN apt-get install -y git
# Make ssh dir
@naepalm
naepalm / Helpers.js
Last active August 3, 2017 22:46
Helper functions for react, such as price currency formatting.
var Helpers = {
/**
* @function formatMoney
* @param {number} n - The number to be formatted
* @param {string} d - The character to be used for the decimal. Defaults to ".".
* @param {string} t - the character to be used for the thousands separator. Defaults to ",".
* @param {int} c - the number of decimal places. Defaults to 2.
* @returns {string}
* @description Formats a number to a price
*/
@merqurio
merqurio / ExportChromePasswords.js
Created May 14, 2016 23:11 — forked from beaverb1ll/ExportChromePasswords.js
ExportChromePasswords.js
var decryptedRow="";
var pm = PasswordManager.getInstance();
var model = pm.savedPasswordsList_.dataModel;
var pl = pm.savedPasswordsList_;
for(i=0;i<model.length;i++){
PasswordManager.requestShowPassword(i);
};
setTimeout(function(){
decryptedRow += '"hostname","username","password","formSubmitURL","httpRealm","usernameField","passwordField"';
for(i=0; i<model.length; i++){
@johnennewdeeson
johnennewdeeson / FeatureContext_fill_in_drupal_autocomplete.inc
Created October 12, 2015 12:49
Use behat extension to fill in a Drupal autocomplete field and select the right option which appears.
/**
* @When I fill in the autocomplete :autocomplete with :text and click :popup
*/
public function fillInDrupalAutocomplete($autocomplete, $text, $popup) {
$el = $this->getSession()->getPage()->findField($autocomplete);
$el->focus();
// Set the autocomplete text then put a space at the end which triggers
// the JS to go do the autocomplete stuff.
$el->setValue($text);
@IslandUsurper
IslandUsurper / gist:12723643dddc9315ff71
Created March 10, 2015 18:50
Behat Step to select an autocomplete suggestion
<?php
use Behat\Mink\Extension\ElementNotFoundException;
use Drupal\DrupalExtension\Context\DrupalContext;
class FeatureContext extends DrupalContext {
/**
* @When I select the first autocomplete option for :prefix on the :field field
*/

ChromeOS Crouton Drupal Development

Show chroot install options: sh ~/Downloads/crouton -t help

Install Ubuntu 14 (Trusty) Gnome Desktop Environment chroot: sudo sh ~/Downloads/crouton -n trusty-gnome -r trusty -t audio,cli-extra,keyboard,gnome,xiwi

Install minimal Ubuntu 14 (Trusty) CLI chroot: sudo sh ~/Downloads/crouton -n trusty-cli -r trusty -t cli-extra

@terrywang
terrywang / Berkshelf
Last active October 25, 2019 23:20
Vagrantfile sample for Vagrant, the following plugins are required: vagrant-berkshelf, vagrant-omnibus, vagrant-proxyconf, vagrant-vbguest, vagrant-proxyconf. Berksfile defines cookbooks and their dependencies. Run berks install to install cookbooks and dependencies.
site :opscode
cookbook 'nginx', '~> 2.4.4'
@aklump
aklump / drupal.arg.js
Last active July 12, 2016 20:05
Add Drupal.arg() for parsing urls in Drupal
/**
* Adds method arg to the Drupal object for grabbing url args
*
* @author Aaron Klump, In the Loft Studios, LLC
* @see http://www.intheloftstudios.com
* @see http://gist.github.com/3078482
*
* For use in a theme or module add the following to your .info file
* @code
* scripts[] = [path to js dir]/drupal.arg.js