Skip to content

Instantly share code, notes, and snippets.

@m3mike
m3mike / keybase.md
Last active November 28, 2021 04:53

Keybase proof

I hereby claim:

  • I am m3mike on github.
  • I am m3 (https://keybase.io/m3) on keybase.
  • I have a public key whose fingerprint is 6523 1D9D 4FDC 9148 BF00 4011 AD60 BD02 9FDE 3022

To claim this, I am signing this object:

#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
# update-alternative (install) ## ubuntu 14.04 vm install using ruby2.0* set of packages
sudo update-alternatives --install /usr/bin/ruby ruby2.0 /usr/bin/ruby2.0 9
sudo update-alternatives --install /usr/bin/erb erb2.0 /usr/bin/erb2.0 9
sudo update-alternatives --install /usr/bin/gem gem2.0 /usr/bin/gem2.0 9
sudo update-alternatives --install /usr/bin/irb irb2.0 /usr/bin/irb2.0 9
sudo update-alternatives --install /usr/bin/rake rake2.0 /usr/bin/rake2.0 9
sudo update-alternatives --install /usr/bin/rdoc rdoc2.0 /usr/bin/rdoc2.0 9
sudo update-alternatives --install /usr/bin/ri ri2.0 /usr/bin/ri2.0 9
sudo update-alternatives --install /usr/bin/testrb testrb2.0 /usr/bin/testrb2.0 9
# =Split Reuters-21578
# =(Found at: http://www.daviddlewis.com/resources/testcollections/reuters21578/)
# =SGML files into separate TXT files
#
# Documents selected are those from LEWIS SPLIT that have at least one topic.
# Documents (only the body of text) are put in directories according to their type (train/test) and topic.
# Documents with more than one topic are written in more than one folder.
# Only documents that have a topic listed in 'used_topics' Array are selected.
# This pre-processing is useful for text categorization applications.
#
@m3mike
m3mike / test.js
Last active August 29, 2015 14:06 — forked from Spoygg/test.js
describe('Test example.com', function(){
before(function(done) {
client.init().url('http://example.com', done);
});
describe('Check homepage', function(){
it('should see the correct title', function(done) {
client.getTitle(function(err, title){
expect(title).to.have.string('Example Domain');
done();
(:
In a lot of cases, gzipping content before you send it to an HTTP client can make a huge difference in download times.
compare downloaded file size of the following two approaches;
:)
xquery version "1.0-ml";
let $page :=<html>
<body>
function Add-Path() {
[Cmdletbinding()]
param([parameter(Mandatory=$True,ValueFromPipeline=$True,Position=0)][String[]]$AddedFolder)
# Get the current search path from the environment keys in the registry.
$OldPath=(Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment' -Name PATH).Path
# See if a new folder has been supplied.
if (!$AddedFolder) {
Return 'No Folder Supplied. $ENV:PATH Unchanged'
}
# See if the new folder exists on the file system.
@m3mike
m3mike / video-wmv.html
Created February 25, 2014 15:09
From http://alistapart.com/article/byebyeembed neat snippet to embed windows media player playback widget that supports ie6/7/8+, Safari, Opera, Firefox, etc...
<object type="video/x-ms-wmv"
data="http://www.sarahsnotecards.com/catalunyalive/ »
fishstore.wmv"
width="320" height="260">
<param name="src"
value="http://www.sarahsnotecards.com/catalunyalive/ »
fishstore.wmv" />
<param name="autostart" value="true" />
<param name="controller" value="true" />
</object>
@m3mike
m3mike / css_resources.md
Created December 20, 2013 14:11 — forked from jookyboi/css_resources.md
CSS libraries and guides to bring some order to the chaos.

Libraries

  • 960 Grid System - An effort to streamline web development workflow by providing commonly used dimensions, based on a width of 960 pixels. There are two variants: 12 and 16 columns, which can be used separately or in tandem.
  • Compass - Open source CSS Authoring Framework.
  • Bootstrap - Sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development.
  • Font Awesome - The iconic font designed for Bootstrap.
  • Zurb Foundation - Framework for writing responsive web sites.
  • SASS - CSS extension language which allows variables, mixins and rules nesting.
  • Skeleton - Boilerplate for responsive, mobile-friendly development.

Guides

@m3mike
m3mike / python_resources.md
Created December 20, 2013 14:11 — forked from jookyboi/python_resources.md
Python-related modules and guides.

Packages

  • lxml - Pythonic binding for the C libraries libxml2 and libxslt.
  • boto - Python interface to Amazon Web Services
  • Django - Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design.
  • Fabric - Library and command-line tool for streamlining the use of SSH for application deployment or systems administration task.
  • PyMongo - Tools for working with MongoDB, and is the recommended way to work with MongoDB from Python.
  • Celery - Task queue to distribute work across threads or machines.
  • pytz - pytz brings the Olson tz database into Python. This library allows accurate and cross platform timezone calculations using Python 2.4 or higher.

Guides