Skip to content

Instantly share code, notes, and snippets.

Process: CloudNotes [94119]
Path: /Applications/CloudNotes.app/Contents/MacOS/CloudNotes
Identifier: com.peterandlinda.CloudNotes
Version: 0.6.4 (9)
Code Type: X86-64 (Native)
Parent Process: launchd [296]
User ID: 501
Date/Time: 2014-03-18 22:38:31.761 -0500
OS Version: Mac OS X 10.8.5 (12F45)
@uzegonemad
uzegonemad / removing-related-youtube-videos-from-wordpress-oembeds.php
Last active August 29, 2015 14:18
Removing "Related YouTube Videos" From WordPress oEmbeds
<?php
add_filter('wpbdp_form_field_html_value', 'alter_wpbdp_form_field_html_value', 10, 3);
function alter_wpbdp_form_field_html_value($value, $post_id, $class)
{
// add tel: to phone numbers
if($class->get_id() == 6) // the ID of the field to modify
{
$value = '<a href="tel:'.preg_replace('/[^0-9]/', '', $value).'">'.$value.'</a>';
}
$root = "C:\Program Files (x86)\Microsoft Games\Halo"
# if sdtm is prefixed, install them
if(Test-Path("$root\Maps-SDTM"))
{
Move-Item "$root\Maps" "$root\Maps-Default"
Move-Item "$root\Maps-SDTM" "$root\Maps"
[System.Windows.Forms.MessageBox]::Show("SDTM Maps Activated")
}
# otherwise install the default
@uzegonemad
uzegonemad / blog-server-maintenance-1.sh
Created April 2, 2015 00:59
blog-server-maintenance
cd /tmp
mysqldump -uroot -p --all-databases > dump.sql
@uzegonemad
uzegonemad / wordpress-drop-down-menus-with-a-custom-walker-1.php
Created April 2, 2015 01:06
wordpress-drop-down-menus-with-a-custom-walker
<?php
class Dropdown_Walker_Nav_Menu extends Walker_Nav_Menu {
function display_element($element, &$children_elements, $max_depth, $depth=0, $args, &$output) {
$id_field = $this->db_fields['id'];
if(!empty($children_elements[$element->$id_field])) {
$element->classes[] = 'dropdown';
}
Walker_Nav_Menu::display_element($element, $children_elements, $max_depth, $depth, $args, $output);
}
@uzegonemad
uzegonemad / link-shorteners-and-a-call-to-action-1.sh
Created April 2, 2015 01:10
link-shorteners-and-a-call-to-action
@uzegonemad
uzegonemad / the-almost-perfect-phone-regex-1.js
Created April 2, 2015 01:17
the-almost-perfect-phone-regex
/^\+?\d{0,}?(\s|-|\.){0,}?\(?\d{3}\)?(\s|-|\.){0,}?\d{3}(\s|-|\.){0,}?\d{4}(\s|-|\.){0,}?(ex?t?|extension)?(\s|-|\.){0,}?\d{0,}?$/
@uzegonemad
uzegonemad / keybase.md
Created April 2, 2015 19:15
keybase.md

Keybase proof

I hereby claim:

  • I am uzegonemad on github.
  • I am uzelac (https://keybase.io/uzelac) on keybase.
  • I have a public key whose fingerprint is 9D46 B155 5B67 E39D 905B E275 F9D0 EABB DC2C DCED

To claim this, I am signing this object: