Skip to content

Instantly share code, notes, and snippets.

View mimiflynn's full-sized avatar

Mimi Flynn mimiflynn

View GitHub Profile
@mimiflynn
mimiflynn / fingless.md
Last active May 8, 2022 21:10
Scan local network without fing
@mimiflynn
mimiflynn / greeting-time.js
Last active June 15, 2017 14:52
Fun little JS utils for life things
// Morning Afternoon or Evening?
const getGreetingTime = (m) => {
let g = null;
if (!m || !m.isValid()) {
return; // exit if not a moment object
}
let split_afternoon = 12 // 24hr time to split the afternoon
let split_evening = 17 // 24hr time to split the evening
@mimiflynn
mimiflynn / AffixWrapper.jsx
Last active January 17, 2017 21:03 — forked from julianocomg/AffixWrapper.jsx
A simple affix React component.
/**
* @author Juliano Castilho <julianocomg@gmail.com>
* ES6 conversion by mimi.flynn@effectiveui.com
*/
import React from 'react';
import ClassNames from 'classnames';
class AffixWrapper extends React.Component {
constructor() {
@mimiflynn
mimiflynn / Preferences.sublime-settings
Last active January 11, 2017 20:52
Current Sublime Settings
{
"bold_folder_labels": true,
"color_scheme": "Packages/Color Scheme - Default/Twilight.tmTheme",
"highlight_line": true,
"ignored_packages":
[
"Vintage"
],
"tab_size": 2,
"translate_tabs_to_spaces": true,
# pip should only run in when virtualenv is currently activated
export PIP_REQUIRE_VIRTUALENV=true
# cache pip-installed packages to avoid re-downloading
export PIP_DOWNLOAD_CACHE=$HOME/.pip/cache
alias profile='vim ~/.bash_profile'
alias rehash='source ~/.bash_profile'
alias show='defaults write com.apple.finder AppleShowAllFiles TRUE && killall Finder'
@mimiflynn
mimiflynn / .tmux.conf
Last active January 6, 2017 22:34
tmux!
# ------------------------------------------------------------------------------
# Mimi's settings
set -g mouse on
# split panes using | and _
bind _ split-window
bind | split-window -h
unbind '"'
@mimiflynn
mimiflynn / form.js
Last active December 12, 2016 03:01
react methods snippets
import React, { Component, PropTypes } from 'react';
import { connect } from 'react-redux';
import validator from 'email-validator';
import classnames from 'classnames';
const mockItems = [{
label: 'topic item one'
}, {
label: 'topic item two'
}];
@mimiflynn
mimiflynn / maps.js
Last active November 4, 2016 15:30
various utilities
import request from 'request';
/**
* Module of Google maps API utils
* @module /app/utils/maps
*/
// create a static map url
const createStaticMap = ({ lat, long }) => {
const url = 'https://maps.googleapis.com/maps/api/staticmap?center=' + lat + ',' + long + '&zoom=13&size=470x450&maptype=roadmap&markers=color:red%7Clabel:CityMD%7C' + lat + ',' + long + '&key=' + global.CONSTANTS.MAPS_KEY;
@mimiflynn
mimiflynn / cookies.js
Created October 21, 2016 21:46
ES6 version of the mozilla lib
/*
* https://developer.mozilla.org/en-US/docs/Web/API/document.cookie
* https://developer.mozilla.org/User:fusionchess
*/
const getItem = (sKey) => {
if (!sKey) { return null; }
return decodeURIComponent(document.cookie.replace(new RegExp('(?:(?:^|.*;)\\s*' + encodeURIComponent(sKey).replace(/[\-\.\+\*]/g, '\\$&') + '\\s*\\=\\s*([^;]*).*$)|^.*$'), '$1')) || null;
};
@mimiflynn
mimiflynn / port.md
Last active September 14, 2016 15:36
What process is using my port?

Find that process thats using the port you want:

lsof -i :4000

If you don't care and just want to kill it:

sudo fuser -k 80/tcp