Skip to content

Instantly share code, notes, and snippets.

View remarkablemark's full-sized avatar

Mark remarkablemark

View GitHub Profile
@remarkablemark
remarkablemark / bind.js
Created May 23, 2016 22:23
Recreate the `bind` method using functional JavaScript.
'use strict';
/**
* Create a bound function.
*
* @param {Function} func - The function to be bound.
* @param {Array} args - The function arguments.
* @param {*} [context] - The function context.
*/
function bind(func, args, context) {
@remarkablemark
remarkablemark / Component.jsx
Created May 26, 2016 18:25
Adjacent JSX elements
'use strict';
/**
* Module dependencies.
*/
const React = require('react');
const adjacentElements = require('./adjacent-elements.jsx');
/**
* Component.
@remarkablemark
remarkablemark / install-git.sh
Created June 2, 2016 15:35
Install Git with homebrew
#!/usr/bin/env bash
function install_homebrew {
# check if brew is installed
if ! command -v brew >/dev/null 2>&1 ; then
echo "installing brew..."
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
fi
brew --version

Heading 1

# Heading 1

Heading 2

# Heading 2
@remarkablemark
remarkablemark / .dockerignore
Last active January 24, 2023 23:20
Docker Node.js Example
node_modules/
*.log
@remarkablemark
remarkablemark / delete-imovie-render-files.sh
Created June 4, 2016 23:32
Script that cleans up iMovie render files.
#!/usr/bin/env bash
# find and delete the `Render Files` directory for each iMovie project to free up space
find ~/Movies/iMovie\ Library.imovielibrary -path "*/Render Files" -type d -exec rm -r {} +
@remarkablemark
remarkablemark / kill-used-port.sh
Created June 6, 2016 21:15
Kill a port that's already in use.
#!/usr/bin/env bash
# for Mac OS X, kill processes associated with port 8000
sudo lsof -t -i tcp:8000 | xargs kill -9