Skip to content

Instantly share code, notes, and snippets.

View D3MZ's full-sized avatar

Demetrius Michael D3MZ

View GitHub Profile
@D3MZ
D3MZ / ad-block-list.txt
Created September 29, 2017 21:03
Bad websites to advertise on
www.breitbart.com
@D3MZ
D3MZ / gist:0edaf6e9bc4e2350687cb88d48fc4fd1
Last active March 27, 2017 22:22
Deep Neural Network Training Performance
Model Name: MacBook Pro
Model Identifier: MacBookPro10,1
Processor Name: Intel Core i7
Processor Speed: 2.6 GHz
Number of Processors: 1
Total Number of Cores: 4
L2 Cache (per Core): 256 KB
L3 Cache: 6 MB
Memory: 16 GB
@D3MZ
D3MZ / gist:be07333969c3e9d4194ab74b9f25a471
Created March 27, 2017 22:20
Deep Neural Network Training Performance for
training loss at step 0: 5.18 (2017-03-26 23:00:12.958387)
training loss at step 10: 6.79 (2017-03-26 23:02:21.577157)
training loss at step 20: 3.92 (2017-03-26 23:04:36.139422)
training loss at step 30: 3.57 (2017-03-26 23:06:38.333611)
training loss at step 40: 5.11 (2017-03-26 23:08:37.515464)
training loss at step 50: 4.66 (2017-03-26 23:10:37.834948)
training loss at step 60: 3.52 (2017-03-26 23:12:37.144137)
training loss at step 70: 3.23 (2017-03-26 23:14:36.581871)
training loss at step 80: 3.22 (2017-03-26 23:16:36.372585)
training loss at step 90: 3.26 (2017-03-26 23:18:44.086892)
#this won't work as a script as you'll get user prompts that you should read. Just run each line individually.
#this is a blend of what's found on google, but re-arranged into a faster deploy.
#via: https://www.howtogeek.com/276468/how-to-use-a-raspberry-pi-as-a-networked-time-machine-drive-for-your-mac/
#and: http://www.techradar.com/how-to/computing/how-to-make-a-mac-time-capsule-with-the-raspberry-pi-1319989
# On your mac, make sure the USB hard drive is HFS+ (The better filesystems are more annoying to work with on Mac), with the appropriate permissions.
# In terminal write: "chmod 777 /Volumes/Time\ Machine && ls -l /Volumes" (Replace "Time\ Machine" with whatever your drive is called)
# You can connect the drive to your pi now.
#update system
@D3MZ
D3MZ / alice_contact_page.txt
Created May 9, 2016 19:17
Facebook event currently fires (correctly but will mis-fire if there are other pixels involved)
on_submit: "fbq('track', 'Lead');"
on_submit: "ga('send', 'event', 'Contact Page', 'Received Submission');"
on_sent_ok: "ga('send', 'event', 'Contact Page', 'Email Sent Successfully');"
@D3MZ
D3MZ / test.js
Created December 29, 2015 20:56
test
// Find all YouTube videos
var $allVideos = $("iframe[src^='//www.youtube.com']"),
// The element that is fluid width
$fluidEl = $("body");
// Figure out and save aspect ratio for each video
$allVideos.each(function() {
$(this)
.NET Compact Framework
.NET Framework
.NET Remoting
.NET for Web
1ShoppingCart
A/B Testing
A2Billing
ADK
ADO.NET
cut -d',' -f6 #Close prices in sheet
awk 'NR>1{print $1-p} {p=$1}' #changes in close prices
awk '{if ($1 != 0) print $1}' #no zeros
perl -ne 'print $_ < 0 ? -1 : 1, "\n";' #up-down format
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDHH2IjCTtka9jUvTWfs0veLjn4xYRT4JpkNAQevwYniS6dGyurH5/y5vm7Db7285tMp/5Ex2jaPPZInqSV9w4o+MaU62gANAI1M+YasExWrrUVzeq/aG7+baaZyk4Ksx/FZkNqsZMEH/yACoKMFvHMMiZcbRGE9bsyfBwyOO5nnO0rSZc78YPGXAfIMiQIX8xt+n0VPqRo9JDsVCYwyhxXnRWWYhqbtJr3SqRf0BbteSuyGu4iWc8DGUEfF+ZNT6WkRR6gHB7eaaBBlssekg82z/7Gjv8H/ax7wd/RWDDk1+zzEAqar6gjrk1/UkwV5t6tTOZ+3GY0SIQjulCoKjlj demetrius.michael@jadedpixel.com
@D3MZ
D3MZ / etsy.rb
Created September 10, 2013 15:40
%w{csv mechanize pp mongo peach parallel}.each { |x| require x }
include Mongo
@coll = MongoClient.new("localhost", 27017)['etsy']['stores']
def extracted url
@agent = Mechanize.new { |agent| agent.user_agent_alias = 'Mac Safari' } #resets cookies, prevent some tracking
page = @agent.get url