Skip to content

Instantly share code, notes, and snippets.

View generalconsensus's full-sized avatar

Daniel McDermott generalconsensus

  • College Grove, TN
View GitHub Profile
@neuro-sys
neuro-sys / fix.md
Last active April 14, 2018 19:35
How to Fix PhantomJS to work with GhostDriver

Copy paste the line below to your terminal:

https://gist.githubusercontent.com/neuro-sys/3bf00b6cf28a93e07e44/raw/e8976da93a55e5ef7c5e8dc99c00772fffb06f6c/replacestring.c
gcc replacestring.c -oreplacestring
./replacestring "$(strings /usr/bin/phantomjs | grep "platform: ghostdriver")" " " < /usr/bin/phantomjs > phantomjs && chmod a+x phantomjs
sudo cp phantomjs /usr/bin/phantomjs

Alright, there's a bug in a recent version of PhantomJS which renders it unable to run with GhostDriver. The error is like this:

@AkshayKalose
AkshayKalose / ajax_example.info.yml
Last active November 23, 2022 13:40
Drupal 8 - Ajax Example
name: 'Ajax Example'
description: 'Just an Ajax Example'
core: 8.x
type: module
@stof
stof / FeatureContext.php
Created December 29, 2014 08:44
Accessing other contexts in Behat 3
<?php
use Behat\Behat\Context\Context;
use Behat\Behat\Hook\Scope\BeforeScenarioScope;
class FeatureContext implements Context {
private $subContext;
/** @BeforeScenario */
public function gatherContexts(BeforeScenarioScope $scope)
@henrik
henrik / eu_country_codes.rb
Last active December 20, 2023 12:20
EU (European Union) country codes, ISO 3166-1 alpha-2. (This Gist is from 2012. Please see comments for updates.)
# Note: VAT identification numbers for Greece use "EL", not "GR".
COUNTRY_CODES_EU = %w[
AT BE BG CY CZ DK EE FI FR DE GR HU IE IT
LV LT LU MT NL PL PT RO SK SI ES SE GB
]
@ziadoz
ziadoz / awesome-php.md
Last active May 10, 2024 15:06
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.
@benbuckman
benbuckman / drupal-syslog-parser.js
Created November 29, 2011 17:56
node.js script to parse Drupal logs in linux syslog (and find distinct 404'd URLs)
// drupal log parser w/ node.js
// takes a filtered syslog file
// run as node `drupal-syslog-parser.js LOGPATH`
// [install dependencies (lazy,underscore) first with `npm install ___`]
var lazy = require('lazy')
, fs = require('fs')
, path = require('path')
, _ = require('underscore');
@zpao
zpao / README.md
Created June 6, 2011 17:56
autoconf 2.13 homebrew formula

Install

  1. install homebrew
  2. place autoconf.rb into Formula folder: /usr/local/Library/Formula/
  3. run brew install autoconf