This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <script type="text/javascript"> | |
| (function () { | |
| "use strict"; | |
| // once cached, the css file is stored on the client forever unless | |
| // the URL below is changed. Any change will invalidate the cache | |
| var css_href = './index_files/web-fonts.css'; | |
| // a simple event handler wrapper | |
| function on(el, ev, callback) { | |
| if (el.addEventListener) { | |
| el.addEventListener(ev, callback, false); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Simple file to help add manual entries to a gravity form, so we don't have to deal w/ GFs output. | |
| */ | |
| require_once $_SERVER['DOCUMENT_ROOT'] . '/wp/wp-load.php'; | |
| $data = $_REQUEST; | |
| // ----------------------------------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # creates a zip archive of the files modified in a merge. | |
| args=("$@") | |
| git archive -o deploy/deploy-${args[1]:0:7}.zip HEAD $(git diff-tree --no-commit-id --name-only -r ${args[1]}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| Plugin Name: PageLines Security Patcher | |
| Description: Blocks the recent exploits for legacy themes in the event you cant update the themes. | |
| Version: 1.0 | |
| Author: PageLines | |
| */ | |
| class Fix_Pagelines_Legacy { | |
| function __construct() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| Plugin Name: Update row based on a custom field ID/key match | |
| Plugin URI: https://wordpress.org/support/topic/update-row-based-on-a-custom-field-idkey-match | |
| */ | |
| add_filter('really_simple_csv_importer_class', function() { | |
| return "ImporterCustomize"; | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var gulp = require('gulp'), | |
| zip = require('gulp-zip'), | |
| pkg = require('./package.json'); | |
| var zipDirs = [ | |
| '*.*', | |
| 'foldertoinclude/**', | |
| '!filetobeignored.txt' | |
| ]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/ | |
| // See also: http://www.paulund.co.uk/change-url-of-git-repository | |
| $ cd $HOME/Code/repo-directory | |
| $ git remote rename origin bitbucket | |
| $ git remote add origin https://github.com/mandiwise/awesome-new-repo.git | |
| $ git push origin master | |
| $ git remote rm bitbucket |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * I was having trouble with socket connections timing out reliably. Sometimes, | |
| * my timeout would be reached. Other times, the connect would fail after three | |
| * to six seconds. I finally figured out it had to do with trying to connect to | |
| * a routable, non-localhost address. It seems the socket_connect call would | |
| * not fail immediately for those connections. This function is what I finally | |
| * ended up with that reliably connects to a working server, fails quickly for | |
| * a server that has an address/port that is not reachable and will reach the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* bling.js */ | |
| window.$ = document.querySelector.bind(document); | |
| window.$$ = document.querySelectorAll.bind(document); | |
| Node.prototype.on = window.on = function(name, fn) { this.addEventListener(name, fn); }; | |
| NodeList.prototype.__proto__ = Array.prototype; | |
| NodeList.prototype.on = function(name, fn) { this.forEach((elem) => elem.on(name, fn)); }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| class SomeDistantApiGateway { | |
| public function __construct($apiKey) { | |
| $this->apiKey = $apiKey; | |
| } | |
| public function getSomeData() { | |
| // whatever API request over guzzle or something |