Skip to content

Instantly share code, notes, and snippets.

View drrobotnik's full-sized avatar

Brandon drrobotnik

  • ThermoFisher Scientific
  • San Diego
View GitHub Profile
from collections import Counter
import argparse
import fnmatch
import os
import sys
from bs4 import BeautifulSoup
matches = []
elements = {}
# This is a blocklist to block samsung smart tv's sending meta data at home.
# Please help to collect domains!
# It could be that the TV does not receive any more updates or other services no longer work. Please report such an incident.
device-metrics-us.amazon.com
samsungacr.com
samsungcloudsolution.com
samsungcloudsolution.net
pavv.co.kr
samsungotn.net
.intro {
display: -ms-flexbox;
display: flex;
-ms-flex-direction: row;
flex-direction: row;
text-align: center;
color: #fff;
background-position: center center;
background-repeat: no-repeat;
background-size: cover;
@drrobotnik
drrobotnik / css.css
Last active May 13, 2016 16:56
gmen
li.g-menu-item.active .g-dropdown {
top: auto !important;
visibility: visible !important;
opacity: 1 !important;
}
@drrobotnik
drrobotnik / gist:09a539f1e8ef705cc7110562baed575a
Created April 22, 2016 18:22
git pull recursively from one level above
find . -maxdepth 1 -type d \( ! -name . \) -exec bash -c "cd '{}' && git rev-parse --verify staging && if [ -n "$?" ]; then ggl; fi" \;
Word Puzzle: What is the longest phrase you can make using the sequence of letters found in the following words:
an
at
we
age
ant
ape
@drrobotnik
drrobotnik / OAuth.php
Last active March 24, 2016 22:54
twittergram
<?php
// vim: foldmethod=marker
/* Generic exception class
*/
if (!class_exists('OAuthException')) {
class OAuthException extends Exception {
// pass
}
}
@drrobotnik
drrobotnik / functions.php
Created November 4, 2015 19:15
exclude posts within the hidden-posts options array
<?php
/*
Code references:
Exclude Posts:
https://jetpack.me/support/customize-related-posts/#exclude
Hidden posts plugin to grab post list to exclude:
https://vip-svn.wordpress.com/plugins/hidden-posts/hidden-posts.php
*/
@drrobotnik
drrobotnik / functions.php
Created September 23, 2015 19:22
redirect requests from matching permastruct pattern to the correct one
add_action( 'wp_loaded', 'tt_redirect_canonical' );
function tt_redirect_canonical() {
$parsed_requested_url = parse_url( $_SERVER['REQUEST_URI'] );
if ( preg_match_all( '/\/[0-9]{4}\/[0-9]{2}\/[0-9]{2}\/(?<post_name>[a-z0-9\-]*)\/?$/', $parsed_requested_url['path'], $matches ) ) {
foreach ( $matches['post_name'] as $match ) {
$args = array(
'name' => $match,
'post_type' => 'post',
'post_status' => 'publish',
@drrobotnik
drrobotnik / _module.post.scss
Created September 2, 2015 00:37
woo responsive table
@media screen and (max-width: 600px) {
.woocommerce-cart,
.woocommerce-checkout {
table {
border: none !important;
&.shop_table {
margin: 0;
}
thead {
display: none;