Skip to content

Instantly share code, notes, and snippets.

Paul Schreiber paulschreiber

Block or report user

Report or block paulschreiber

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View wp_mail.php
/**
* Send mail, similar to PHP's mail
*
* A true return value does not automatically mean that the user received the
* email successfully. It just only means that the method used was able to
* process the request without any errors.
*
* Using the two 'wp_mail_from' and 'wp_mail_from_name' hooks allow from
* creating a from address like 'Name <email@address.com>' when both are set. If
* just 'wp_mail_from' is set, then just the email address will be used with no
@paulschreiber
paulschreiber / vvv-2.1.log
Created Nov 2, 2017
VVV 2.1-develop provisioning log
View vvv-2.1.log
==> default: Network connection detected...
==> default: Bash profile setup and directories.
==> default: sending incremental file list
==> default: db_backup
==> default: db_restore
==> default: makepot
==> default: vagrant_destroy
==> default: vagrant_halt
==> default: vagrant_suspend
==> default: vagrant_up
@paulschreiber
paulschreiber / noflash.md
Last active Jun 28, 2016
Disabling Flash in your web browser
View noflash.md

For Chrome

  • Chrome > Preferences
  • Click “show advanced settings”
  • Under Privacy, click “Content Settings”
  • Under Plugins, click “Let me choose when to run plugin content”

For Safari

  • Safari > Preferences
  • Click Security
  • Click “Plug-in Settings”
View slack.txt
Sampling process 51673 for 3 seconds with 1 millisecond of run time between samples
Sampling completed, processing symbols...
Analysis of sampling Slack (pid 51673) every 1 millisecond
Process: Slack [51673]
Path: /Applications/Slack.app/Contents/MacOS/Slack
Load Address: 0x1039c4000
Identifier: com.tinyspeck.slackmacgap
Version: 2.0.1 (3305)
Code Type: X86-64
Parent Process: ??? [1]
View node_2015-08-17_225043_5GlG.sample.txt
This file has been truncated, but you can view the full file.
Analysis of sampling node (pid 19042) every 1 millisecond
Process: node [19042]
Path: /usr/local/bin/node
Load Address: 0x100000000
Identifier: node
Version: ???
Code Type: X86-64
Parent Process: bash [18739]
@paulschreiber
paulschreiber / wp-plugin.rb
Created Jul 11, 2015
Update WordPress plugin
View wp-plugin.rb
#!/usr/bin/env ruby
require "fileutils"
require "httparty"
def update(slug)
url = "https://api.wordpress.org/plugins/info/1.0/#{slug}.json?fields=-compatibility,-sections,-tags,-ratings,-short_description"
response = HTTParty.get(url, {request: :json})
unless response["version"]
@paulschreiber
paulschreiber / update-plugins.rb
Created Jul 10, 2015
WordPress plugin updater
View update-plugins.rb
#!/usr/bin/env ruby
require "FileUtils"
require "httparty"
require "tmpdir"
def update(slug)
url = "https://api.wordpress.org/plugins/info/1.0/#{slug}.json?fields=-compatibility,-sections,-tags,-ratings,-short_description"
response = HTTParty.get(url, {request: :json})
@paulschreiber
paulschreiber / zendesk.js
Created May 27, 2015
ZenDesk ticket summarizer
View zendesk.js
jQuery('script').each(function(index, element) {
v = jQuery(this).text().match("(?:Task|Problem|Question|Incident|Ticket) #([0-9]+).+\closed..(normal|high|low|urgent)");
if (v) {
console.log(v[1],v[2]);
}
});
@paulschreiber
paulschreiber / fb-id.py
Created Apr 9, 2015
Facebook User ID fetcher
View fb-id.py
#!/usr/bin/python
import requests
import re
url = 'https://www.facebook.com/zuck'
idre = re.compile('"entity_id":"([0-9]+)"')
page = requests.get(url)
print idre.findall(page.content)
@paulschreiber
paulschreiber / gist:a98c91abf3ae4ab9232e
Created Jan 22, 2015
strace puppet (vip quickstart)
View gist:a98c91abf3ae4ab9232e
vagrant@vip:~$ sudo strace -p 2335
Process 2335 attached - interrupt to quit
stat64("/usr/local/lib/site_ruby/1.8/puppet.rb", 0xbfaf1740) = -1 ENOENT (No such file or directory)
stat64("/usr/local/lib/site_ruby/1.8/puppet.so", 0xbfaf1740) = -1 ENOENT (No such file or directory)
stat64("/usr/local/lib/site_ruby/1.8/i686-linux/puppet.rb", 0xbfaf1740) = -1 ENOENT (No such file or directory)
stat64("/usr/local/lib/site_ruby/1.8/i686-linux/puppet.so", 0xbfaf1740) = -1 ENOENT (No such file or directory)
stat64("/usr/local/lib/site_ruby/1.8/i486-linux/puppet.rb", 0xbfaf1740) = -1 ENOENT (No such file or directory)
stat64("/usr/local/lib/site_ruby/1.8/i486-linux/puppet.so", 0xbfaf1740) = -1 ENOENT (No such file or directory)
stat64("/usr/local/lib/site_ruby/puppet.rb", 0xbfaf1740) = -1 ENOENT (No such file or directory)
stat64("/usr/local/lib/site_ruby/puppet.so", 0xbfaf1740) = -1 ENOENT (No such file or directory)
You can’t perform that action at this time.