Skip to content

Instantly share code, notes, and snippets.

View msonnabaum's full-sized avatar

Mark Sonnabaum msonnabaum

  • Lithic
  • San Diego, CA
View GitHub Profile
@hadley
hadley / ds-training.md
Created March 13, 2015 18:49
My advise on what you need to do to become a data scientist...

If you were to give recommendations to your "little brother/sister" on things that they need to do to become a data scientist, what would those things be?

I think the "Data Science Venn Diagram" (http://drewconway.com/zia/2013/3/26/the-data-science-venn-diagram) is a great place to start. You need three things to be a good data scientist:

  • Statistical knowledge
  • Programming/hacking skills
  • Domain expertise

Statistical knowledge

@vdm
vdm / ixgbevf-upgrade.sh
Last active November 28, 2019 21:35
ixgbevf 2.16.1 upgrade for AWS EC2 SR-IOV "Enhanced Networking" on Ubuntu 14.04 (Trusty) LTS
ssh ubuntu@n.n.n.n "bash -s -x" -- <ixgbevf-upgrade.sh
@aastaneh
aastaneh / gist:46ceb03150e5284b8a3a
Last active August 29, 2015 14:07
How to swap out AWS ELB Policies for CVE-2014-3566 using AWS CLI Tools
https://aws.amazon.com/security/security-bulletins/CVE-2014-3566-advisory/
says to go into the web interface and change SSL negotiation settings.
What if you have hundreds of ELBs to change? NO BUENO.
Here's how to do it using the CLI tools:
# List Existing Policies
aws elb describe-load-balancer-policies --load-balancer-name $ELBNAME --output text | grep POLICYDESCRIPTIONS
var Dialog = React.createClass({
render: function() {
// 1) render nothing, this way the DOM diff will never try to do
// anything to it again, and we get a node to mess with
return React.DOM.div();
},
componentDidMount: function() {
// 2) do DOM lib stuff
this.node = this.getDOMNode();
@hbokh
hbokh / gist:33d9ff5d87e433410e77
Created May 6, 2014 12:25
Logstash, collectd and kibana for one host's system resources
{
"title": "System Resources",
"services": {
"query": {
"list": {
"0": {
"query": "collectd_type:\"load\"",
"alias": "Load",
"color": "#70DBED",
"id": 0,
@karmi
karmi / .gitignore
Last active August 24, 2020 09:25
Elasticat makes Elasticsearch JSON responses pretty • http://git.io/elasticat
.DS_Store
tmp/

Install XHProf

Pear

pear upgrade PEAR
pecl install xhprof-0.9.2

MAMP

<?php
foreach (array_keys(views_get_all_views()) as $view) {
$view = views_get_view($view);
$view->display['default']->display_options['cache'] = array('type' => time, 'results_lifespan' => -1, 'output_lifespan' => 1800);
$view->save();
}
#!/usr/bin/env ruby
require 'yaml'
contributors = Hash.new(0)
%x[git log 8.x --since=2011-03-09 -s --format=%s].split("\n").each do |m|
m.scan(/\s(?:by\s?)([\w\s,.|]+):/i).each do |people|
people[0].split(/[,|]/).each do |p|
p.strip!
contributors[p] += 1 unless p.nil?
end
<?php
// media_gallery.module
function media_gallery_menu() {
$items['media-gallery/detail/%node/%file'] = array(
'page callback' => 'media_gallery_detail_page',
'page arguments' => array(2, 3),
'access callback' => 'node_access',
'access arguments' => array('view', 2),