Skip to content

Instantly share code, notes, and snippets.

View derick-montague's full-sized avatar
🕉️
Om is a living phenomenon and it has its own mood

Derick Montague derick-montague

🕉️
Om is a living phenomenon and it has its own mood
View GitHub Profile
@derick-montague
derick-montague / guide.md
Last active February 20, 2019 19:15
Setting up virtual box
@derick-montague
derick-montague / sync-github-to-bitbucket.md
Last active March 11, 2024 09:36
Sync github repo to bitbucket repo

Set up remotes

setup local repo

mkdir myrepository
cd myrepository
git init

add bitbucket remote as "origin"

@derick-montague
derick-montague / readme.md
Last active November 10, 2016 06:49
IIS Wordpress permissions that resolve various rewrite errors
@derick-montague
derick-montague / .bash_profile
Created February 21, 2016 17:03
bash profile
# open files with sublime text (e.g. 'subl .')
alias subl='/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl'
export EDITOR='subl -w'
# Kills all processes running on the specified port (e.g. 'killport 8080')
killport() {
lsof -i tcp:$1 | awk '(NR!=1) && ($1!="Google") && ($1!="firefox") {print $2}' | xargs kill
}
# shows pwd in iterm title
@derick-montague
derick-montague / add-footer-action.php
Created December 29, 2015 19:25
WordPress: Inject javascript after footer
@derick-montague
derick-montague / scroll-top.js
Created December 29, 2015 14:02
Simple and small vanilla js script for animating scroll to top
(function() {
'use strict';
var toTopLink = document.querySelector('.js-scroll');
var scrollToTop = function(scrollDuration) {
var scrollStep = -window.scrollY / (scrollDuration / 15),
scrollInterval = setInterval(function() {
if ( window.scrollY !== 0 ) {
window.scrollBy( 0, scrollStep );
}
else {
@derick-montague
derick-montague / utilities.js
Last active April 20, 2017 02:21
Various vanilla js replacements for jQuery methods
module.exports = {
extend: function extend() {
for (var i = 1; i < arguments.length; i++)
for(var key in arguments[i])
if(arguments[i].hasOwnProperty(key))
arguments[0][key] = arguments[i][key];
return arguments[0];
},
@derick-montague
derick-montague / custom-post.php
Last active October 16, 2016 18:20
Wordpress loops and other
<?php
// Adding custom posts
add_action('init', 'team_register');
function team_register() {
$labels = array(
'name' => _x('Team Members', 'post type general name'),
'singular_name' => _x('Team Member', 'post type singular name'),
@derick-montague
derick-montague / micro-clearfix
Created June 20, 2015 01:49
Nicolas Gallagher's Micro Clearfix
/**
* For modern browsers
* 1. The space content is one way to avoid an Opera bug when the
* contenteditable attribute is included anywhere else in the document.
* Otherwise it causes space to appear at the top and bottom of elements
* that are clearfixed.
* 2. The use of `table` rather than `block` is only necessary if using
* `:before` to contain the top-margins of child elements.
*/
.cf:before,
/**
* (C)Leanest CSS spinner ever
*/
@keyframes spin {
to { transform: rotate(1turn); }
}
.progress {
position: relative;