Skip to content

Instantly share code, notes, and snippets.

View danflies's full-sized avatar

Dan Flies danflies

View GitHub Profile
@danflies
danflies / wget-404-finder.md
Last active April 2, 2018 15:11
Use wget to find broken links.

Found the resource on Created By Pete

Set Up

First, you’ll need to make sure you have Wget, on OS X you can just use Homebrew.

brew install wget

Command

@danflies
danflies / behat-reference.feature
Last active March 7, 2018 16:39 — forked from mnapoli/behat-reference.feature
Behat Mink reference
# Given
Given I am on [the] homepage
Given I am on "url"
# When
When I go to [the] homepage
When I go to "url"
When I reload the page
@danflies
danflies / get_elq_guid.js
Last active August 31, 2017 21:27
Get the Eloqua Cookie GUID
function elqGetGuidCookieValue() {
var name, value, index, cookies=document.cookie.split(';');
for (var i = 0; i < cookies.length; i++) {
index = cookies[i].indexOf('=');
if (index > 0 && cookies[i].length > index + 1) {
name = cookies[i].substr(0, index).trim();
if (name == 'ELOQUA') {
value = cookies[i].substr(index + 1);
var subCookies = value.split("&");
for (var l = 0; 1 < subCookies.length; l++) {
@danflies
danflies / toggl-triage-bookmarklet.js
Last active June 19, 2017 19:39
Bookmarklet to create new projects from URL case numbers in the new Desk Interface.
javascript:(function () {
var match = window.location.href.match(/case\/(\d*)/);
var ticketNumber = match[1];
var userToken = '360a6f712f81c3841de1e5f013316110';
var workspaceId = 918242;
function submitTimeOnProject(project) {
console.log('Submiting time on project', project);
var entryRequest = new XMLHttpRequest();
<span elqid="7" elqtype="DynamicContent" class="remove-absolute" style="display: block"></span>
<!-- Change the eqlid value to the id of the dynamic content you want to use -->
@danflies
danflies / Add_Parameter_to_Link.js
Last active October 10, 2016 21:02
Add a new query string parameter to a specific URL.
@danflies
danflies / WebEx.js
Last active December 8, 2016 01:02
A bookmarklet to set a default meeting location and description, because it is bullshit that it doesn't exist already.
javascript:(function () {
var calDescription = document.getElementsByTagName('textarea')[0];
calDescription.value = 'http://relationshipone.webex.com/meet/dan.flies\n\n+1-415-655-0002 US Toll\n808 992 406 Access code';
calDescription.click();
calDescription.focus();
})();
@danflies
danflies / Tweet-Share-from-Email.html
Created September 7, 2016 16:14
Tweet or share to LinkedIn, Twitter and Facebook via WebIntent links.
<a href="https://twitter.com/intent/tweet?text=YOUR%20TEXT%20HERE&url=http://example.com/&hashtag=comma,separated,list&via=twitterusername">Tweet</a>
<!--- here is more documenation from Twitter: https://dev.twitter.com/web/tweet-button/web-intent -->
<a href="https://facebook.com/share.php?url=http://example.com">Facebook</a>
<!-- No known documentation for Facebook, yet -->
<a href="https://www.linkedin.com/shareArticle?mini=true&url=http://developer.linkedin.com&title=LinkedIn%20Developer%20Network
&summary=My%20favorite%20developer%20program&source=LinkedIn">LinkedIn</a>
<!-- Documenation for LinkedIn Sharing: https://developer.linkedin.com/docs/share-on-linkedin Click on "Customized URL" to see the proper documentation -->
@danflies
danflies / bashrc-shortcuts.bash
Last active September 9, 2016 21:23
BASH shortcuts for ls -a, ls -l with utilities for changing and deleting directories.
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
alias ll="ls -lhGF"
alias la="ls -lahGF"
mkcd(){
mkdir "$1" && cd "$1"
}
@danflies
danflies / email-background-image-example.html
Created June 8, 2016 14:06
Example of using a background image in a HTML email. From Ben @ Emerson
<table border="0" cellpadding="0" cellspacing="0" width="600">
<tbody>
<tr style="font-family:Arial;">
<td background="http://images.go.emersonprocess.com/EloquaImages/clients/EmersonProcessManagement/%7b857a37af-a23e-40c4-85d6-536a2b0ca5b0%7d_dvc-power-boiler_600x130.jpg" bgcolor="#595858" width="600" height="130" valign="middle" style="mso-line-height-rule:exactly;line-height:30px;">
<!--[if gte mso 9]>
<v:rect
xmlns:v="urn:schemas-microsoft-com:vml" fill="true" stroke="false" style="width:600px;height:130px;">
<v:fill type="tile" src="http://images.go.emersonprocess.com/EloquaImages/clients/EmersonProcessManagement/%7b857a37af-a23e-40c4-85d6-536a2b0ca5b0%7d_dvc-power-boiler_600x130.jpg" color="#595858" />
<v:textbox inset="0,0,0,0">
<![endif]-->