Skip to content

Instantly share code, notes, and snippets.

View findingsimple's full-sized avatar

Jason Conroy findingsimple

View GitHub Profile
@findingsimple
findingsimple / codeception-example.yml
Created December 6, 2017 03:59
Example codecption webdriver config
modules:
enabled:
- WebDriver:
url: http://site-to-test.com
host: 'http://localhost:4444/wd/hub'
port: 4444
browser: chrome ( 'firefox' or 'phantomjs' etc. )
@findingsimple
findingsimple / php-webdriver-example.php
Created December 6, 2017 03:56
Example php-webdriver host config
$host = 'http://localhost:4444/wd/hub';
// For Chrome
$capabilities = DesiredCapabilities::chrome();
$capabilities->setCapability( 'acceptSslCerts', true );
// For Firefox
//$capabilities = DesiredCapabilities::firefox();
//$capabilities->setCapability( 'acceptInsecureCerts', true );
@findingsimple
findingsimple / .htaccess
Created November 28, 2017 07:58
HTTP_AUTHORIZATION modification for WP .htaccess file
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
@findingsimple
findingsimple / wp-login-api-discovery.php
Last active November 28, 2018 16:14
WP Login Page API Disovery
<?php
/*
Plugin Name: WP Login Page API Disovery
Plugin URI: https://gist.github.com/jconroy/180d629543437eaf765dafdf82aa2524
Description: Adds the WP REST API link header and link element to the wp-login.php page.
Author: Robot Ninja, Jason Conroy
Version: 1.0
Author URI: https://robotninja.com
*/
@findingsimple
findingsimple / customer-interview-script-template.md
Created November 7, 2017 05:09
Customer Interview Script Template

Customer Interview Script Template

Interviewer Customer Date
[name] [name] [DD/MM/YYYY 00:00am]

Remember

Do not talk about the idea/solution

@findingsimple
findingsimple / php-openssl.md
Created September 2, 2017 10:00 — forked from ryanscherler/php-openssl.md
Use Homebrew PHP with OpenSSL instead of SecureTransport
@findingsimple
findingsimple / dl-file.php
Created February 25, 2017 01:53 — forked from hakre/dl-file.php
Wordpress login to download uploaded files
<?php
/*
* dl-file.php
*
* Protect uploaded files with login.
*
* @link http://wordpress.stackexchange.com/questions/37144/protect-wordpress-uploads-if-user-is-not-logged-in
*
* @author hakre <http://hakre.wordpress.com/>
* @license GPL-3.0+
#!/usr/bin/ruby
# Create display override file to force Mac OS X to use RGB mode for Display
# see http://embdev.net/topic/284710
require 'base64'
data=`ioreg -l -d0 -w 0 -r -c AppleDisplay`
edids=data.scan(/IODisplayEDID.*?<([a-z0-9]+)>/i).flatten
vendorids=data.scan(/DisplayVendorID.*?([0-9]+)/i).flatten

Let's say you have an iOS project, and you want to use some external library, like AFNetworking. How do you integrate it?

With submodules

Add the project to your repo:

git submodule add [email protected]:AFNetworking/AFNetworking.git Vendor/AFNetworking

or something to that effect.

<!DOCTYPE html>
<html>
<head>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" type="text/javascript"></script>
</head>
<body>
<div id="container" style="width:100%;">
<div class="fb-like-box" data-href="https://www.facebook.com/adobegocreate" data-width="292" data-show-faces="true" data-stream="true" data-header="true"></div>
</div>