Skip to content

Instantly share code, notes, and snippets.

View brianfryer's full-sized avatar

Brian Fryer brianfryer

View GitHub Profile

Keybase proof

I hereby claim:

  • I am brianfryer on github.
  • I am brianfryer (https://keybase.io/brianfryer) on keybase.
  • I have a public key ASBol5Dje8vplEj_ibhmK2JN2fJThrse0Cg6fua8QAn59Ao

To claim this, I am signing this object:

@brianfryer
brianfryer / parsing
Created September 23, 2013 23:49
This script is capable of parsing a snapnames text file to create a new text file that contains a list of domain names 6 characters in length or less.
// Get access to the file system
fs = require('fs');
// Grab the text file
var lines = fs.readFileSync('./snapnames.txt', 'utf8')
.replace(/([^\dA-z\.\-])+(\s+\S+\s+)/g, ',') // trim the file
.split(','), // make it into an array
domains = [];
// Parse each item in the array
@brianfryer
brianfryer / gist:5987888
Created July 12, 2013 21:12
cornsole.log()
var cornsole = {
log: function(txt) {
var cornhole = atob('ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC4tLS0tLS0tLS0tLS0tLg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyAgICAgICAgICAgICAgIFwNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyAuLS0tLS0uICAgICAgICAgXA0KSSBhbSB0aGUgR3JlYXQgQ29ybmhvbGlvISEgICAgICAgICB8LyAtLWAtYC1cICAgICAgICAgXA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB8ICAgICAgICAgXCAgICAgICAgfA0KSSBuZWVkIFRQIGZvciBteSBidW5naG9sZSEhICAgICAgICAgfCAgIF8tLSAgIFwgICAgICAgfA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgX3wgPS0uICAgICB8ICAgICAgfA0KQ29tZSBvdXQgd2l0aCB5b3VyIHBhbnRzIGRvd24hICAgICAgb3wvby8gICAgICB8ICAgICAgfA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLyAgfiAgICAgICB8ICAgICAgfA0KQVJFIFlPVSBUSFJFQVRFTklORyBNRT8/ICAgICAgICAgIChfX19fQCkgIF9fXyB8ICAgICAgfA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBfPT09fn5+LmB8ICAgICAgfA0KT2guIGhlaC1oZWguICBTb3JyeSBhYm91dCB0aGF0LiAgIF9fX19fX18uLS1+ICB8ICAgICAgfA0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBcX19fX19
@brianfryer
brianfryer / displaychildren.php
Created May 7, 2013 23:04
A snippet to display child pages of the current page for WordPress.
<?php
if ( have_posts() ) while ( have_posts() ) : the_post();
endwhile;
$childArgs = array(
'post_parent' => $post->ID,
'post_type' => 'page',
'posts_per_page' => '-1',
'orderby' => 'menu_order',
'order' => 'ASC'