Skip to content

Instantly share code, notes, and snippets.

@Moofx
Moofx / html5basic.html
Created December 17, 2015 01:12 — forked from ricardozea/html5basic.html
Sublime Text 2 Snippet: HTML5 (Basic)
<snippet>
<content><![CDATA[
<!DOCTYPE html>
<!--[if IE 8]> <html class="no-js ie8" lang="en"> <![endif]-->
<!--[if IE 9]> <html class="no-js ie9" lang="en"> <![endif]-->
<!--[if gt IE 9]><!--><html class="no-js" lang="en"><!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
@Moofx
Moofx / html5advanced.html
Created December 17, 2015 01:17 — forked from ricardozea/html5advanced.html
Sublime Text 2 Snippet: HTML5 (Advanced)
<snippet>
<content><![CDATA[
<!DOCTYPE html>
<!--[if IE 8]> <html class="no-js ie8" lang="en"> <![endif]-->
<!--[if IE 9]> <html class="no-js ie9" lang="en"> <![endif]-->
<!--[if gt IE 9]><!--><html class="no-js" lang="en"><!--<![endif]-->
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
@Moofx
Moofx / section.sublime-snippet
Created December 17, 2015 01:24 — forked from asawilliams/section.sublime-snippet
css style guide topics and css section snippets for sublime text
<snippet>
<content><![CDATA[
/* ==========================================================================
${1:Section comment block}
========================================================================== */
${2}
]]></content>
<!-- Optional: Set a tabTrigger to define how to trigger the snippet -->
<tabTrigger>/*=</tabTrigger>
<!-- Optional: Set a scope to limit where the snippet will trigger -->

Animated SVG – Event Map

This animated SVG map was produced for Hallowbaloo.com, the website for an annual Halloween event in Honolulu.

The graphic went through several stages from Illustrator -> Sketch -> Sublime Text. Thank goodness I had an awesome graphic designer, Andreina Keller, getting me the original graphic.

I optimized the map down to less than 48kb through several iterations. The first run was to find all unnecessary code supplied by Sketch. The next run meant finding repeated elements in the map and making good use of <def> & <use>. The last run of optimization was taking the text supplied through my designer's graphic and converting them to <text> elements. All of a sudden, the file was tiny—relatively speaking—coming from an original 170kb.

By using some Jade 'include' statements, I was able to import the file inline into the proper template file. Sweet, I had SCSS control of all animation and styling.

# For SCSS-Lint v0.31.0
linters:
BangFormat:
enabled: true
space_before_bang: true
space_after_bang: false
BorderZero:
@Moofx
Moofx / .eslintrc.js
Created February 11, 2017 21:51 — forked from nkbt/.eslintrc.js
Strict ESLint config for React, ES6 (based on Airbnb Code style)
{
"env": {
"browser": true,
"node": true,
"es6": true
},
"plugins": ["react"],
"ecmaFeatures": {
@Moofx
Moofx / Vagrantfile
Created June 1, 2017 12:43 — forked from Jakobud/Vagrantfile
Vagrant Windows 260 character path limit workaround
# If you are using Windows as your Vagrant host OS, there is a limitation in Windows where any given folder path
# cannot be more than 260 characters long. This becomes a problem with Vagrant because, for example, if you
# install a Linux guest environment and try to create a deep directory structure in a synced folder, Linux will
# throw errors. This is because the synced folder is under the constraints of the Windows host. A common example
# of this happening is when installing node.js modules. NPM is known for creating some very long, deep
# folder paths because each node depenency has it's own dependencies, which have their own dependencies, etc...
#
# This gist solves the problem and works around the Windows 260 character path limit. Add it to your Vagrantfile.
#
# NOTE: This bug in Vagrant was fixed in 1.7.3, but reverted back in 1.7.4 due to some regression bugs.
@Moofx
Moofx / Vagrantfile
Created June 1, 2017 14:01
Vagrantfile (Local)
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.network "private_network", type: "dhcp"
config.vm.network :forwarded_port, guest: 3000, host: 3000
config.vm.network :forwarded_port, guest: 5858 , host: 5858
config.vm.network :forwarded_port, guest: 8080, host: 8080
config.vm.network :forwarded_port, guest: 9000, host: 9000
@Moofx
Moofx / INSTALL
Created June 2, 2017 19:46 — forked from arya-oss/INSTALL.md
Ubuntu 16.04 Developer Tools installation
###### development tools
sudo apt-get install build-essential python-dev git nodejs-legacy npm gnome-tweak-tool openjdk-8-jdk
### Python packages
sudo apt-get install python-pip python-virtualenv python-numpy python-matplotlib
### pip packages
pip install django flask django-widget-tweaks django-ckeditor beautifulsoup4 requests classifier SymPy ipython
@Moofx
Moofx / vps.sh
Created June 25, 2017 01:50 — forked from zipizap/vps.sh
#PROLOGUE: all this should be run as root, otherwise stated
#update && upgrade:
apt-get update && apt-get upgrade -y
#create a new user
adduser user_x
#create group admin (funny enough, it does not exist, although its accounted in the /etc/sudoers file):
addgroup --system admin