Skip to content

Instantly share code, notes, and snippets.

View jackreichert's full-sized avatar

Jack Reichert jackreichert

View GitHub Profile

Keybase proof

I hereby claim:

  • I am jackreichert on github.
  • I am jrbv (https://keybase.io/jrbv) on keybase.
  • I have a public key ASBnI2KlsGXVi_SlY1nrsj11Gcywpy2u9PuOd3UiVDVcWAo

To claim this, I am signing this object:

@jackreichert
jackreichert / google-maps-react
Created August 6, 2017 18:00
gist for issue submission
import React, {Component} from 'react';
import {connect} from 'react-redux';
import {Map, Marker, GoogleApiWrapper} from 'google-maps-react';
class EventMap extends Component {
constructor() {
super();
this.styles = [
{
featureType: "all",
config.trigger.before :halt do
info "Dumping the database before shutting down..."
run_remote "bash /vagrant/assets/exportdb.sh"
run_remote "bash /vagrant/assets/gz-wpcontent.sh"
end
@jackreichert
jackreichert / check.js
Last active November 8, 2015 18:38
Gists for Augmenting Ozh's Twitter Archiver
check = function () {
if (twitter_ids.length >= 1) {
// was timing out at the 100 max you can play with this, will differ per server
var batch = twitter_ids.splice(0, 15);
wp_jsonp("import_tweets", "import_tweets", {variable: batch}, import_tweets);
// 150 calls per 15 minues. 900sec/150 + a bit for safety.
setTimeout(check, timeout);
} else {
if (error_ids.length > 0) {
$('#csv_file_upload').prepend("<p>" + error_ids.length + " tweets not imported. You may have hit a limit, you can try again in 15 minutes to get the rest.</p>");
@jackreichert
jackreichert / Keychain.swift
Last active January 11, 2017 02:43 — forked from s-aska/Keychain.swift
Swift Keychain class ( supported Xcode Version 7.0 beta 4 (7A165t) )
import UIKit
import Security
class Keychain {
class func save(key: String, data: NSData) -> Bool {
let query = [
kSecClass as String : kSecClassGenericPassword as String,
kSecAttrAccount as String : key,
kSecValueData as String : data ]
@jackreichert
jackreichert / another_plugin.php
Last active November 9, 2015 20:20
wp-jsonp example
<?php
/**
* Plugin Name: another plugin
* Plugin URI: http://www.jackreichert.com/2015/07/02/how-to-jsonp-ajax-to-ssl-in-wordpress-an-easier-way/
* Description: An example of how you might use wp_jsonp.
* Version: 0.1
* Author: jackreichert
* Author URI: http://www.jackreichert.com/
* License: GPL3
@jackreichert
jackreichert / jsonp.js
Last active November 9, 2015 20:12
wp_jsonp
if (typeof wp_jsonp === 'undefined')
var wp_jsonp = function (event, method, params, callbackFunc) {
// data needed to send jsonp
var data = {
action: event, // wp ajax action
ajaxSSLNonce: wp_jsonp_vars.wpAJAXNonce, // nonce
method: method, // server has switch/case for processing
params: params // data to be processed
};
/* Generated by: FontSquirrel */
@font-face {
font-family: 'corbert-regular';
src: url('corbert-regular-webfont-webfont.eot');
src: url('corbert-regular-webfont-webfont.eot?#iefix') format('embedded-opentype'),
url('corbert-regular-webfont-webfont.woff2') format('woff2'),
url('corbert-regular-webfont-webfont.woff') format('woff'),
url('corbert-regular-webfont-webfont.ttf') format('truetype'),
url('corbert-regular-webfont-webfont.svg#webfontregular') format('svg');
font-weight: normal;
@jackreichert
jackreichert / web-fonts.php
Last active October 6, 2016 11:15
Enqueuing Fonts in WordPress
<?php // add the following into your theme's functions.php
function theme_fonts() {
// typekit
wp_enqueue_script( 'theme_typekit', '//use.typekit.net/xxxxxxx.js');
// fonts.com
wp_enqueue_script( 'theme_fontsdotcom', '//fast.fonts.net/jsapi/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.js');
// google fonts - Josefin (a favorite)
@jackreichert
jackreichert / osx-showhide.sh
Created May 25, 2015 16:19
Show/Hide Files alias - OSX Yosemite
alias showFiles='defaults write com.apple.finder AppleShowAllFiles YES;
killall Finder /System/Library/CoreServices/Finder.app'
alias hideFiles='defaults write com.apple.finder AppleShowAllFiles NO;
killall Finder /System/Library/CoreServices/Finder.app'