Skip to content

Instantly share code, notes, and snippets.

View taivu's full-sized avatar

Tai taivu

View GitHub Profile
@taivu
taivu / git-change-commit-messages.md
Created January 18, 2018 14:18 — forked from nepsilon/git-change-commit-messages.md
How to change your commit messages in Git? — First published in fullweb.io issue #55

How to change your commit messages in Git?

At some point you’ll find yourself in a situation where you need edit a commit message. That commit might already be pushed or not, be the most recent or burried below 10 other commits, but fear not, git has your back 🙂.

Not pushed + most recent commit:

git commit --amend

This will open your $EDITOR and let you change the message. Continue with your usual git push origin master.

@taivu
taivu / README.md
Created December 28, 2017 20:50 — forked from hofmannsven/README.md
My simply MySQL Command Line Cheatsheet
# bash <(curl -s https://gist.github.com/drye/5387341/raw/ec72cddfe43ec3d39c91a3c118cb68ab14a049f8/enable_dnsmasq_on_osx.sh)
# ----------------------
# installing dnsmasq and enable daemon
# ----------------------
brew install dnsmasq
sudo cp -v $(brew --prefix dnsmasq)/homebrew.mxcl.dnsmasq.plist /Library/LaunchDaemons
# ----------------------
# adding resolver for vbox domain
# ----------------------
@taivu
taivu / JS__ish-i-like.md
Created October 30, 2017 14:00
JS stuff I like to use.
Name of Library or Plugin Description
waypointsJS library that makes it easy to execute a function whenever you scroll to an element.
hamburgers Tasty CSS-animated Hamburgers
@taivu
taivu / git-feature-workflow.md
Created October 30, 2017 13:43 — forked from blackfalcon/git-feature-workflow.md
Git basics - a general workflow

There are many Git workflows out there, I heavily suggest also reading the atlassian.com [Git Workflow][article] article as there is more detail then presented here.

The two prevailing workflows are [Gitflow][gitflow] and [feature branches][feature]. IMHO, being more of a subscriber to continuous integration, I feel that the feature branch workflow is better suited.

When using Bash in the command line, it leaves a bit to be desired when it comes to awareness of state. I would suggest following these instructions on [setting up GIT Bash autocompletion][git-auto].

Basic branching

When working with a centralized workflow the concepts are simple, master represented the official history and is always deployable. With each now scope of work, aka feature, the developer is to create a new branch. For clarity, make sure to use descriptive names like transaction-fail-message or github-oauth for your branches.

@taivu
taivu / drupal 8 modules.md
Created October 25, 2017 18:50
drupal 8 modules i like using
Module Description
address robust address field for locations
admin_toolbar dropdown admin menus
anchor_link
better_exposed_filters
captcha spam protection for webforms
crop expose image cropping api
cshs
ctools needed by pathauto
// ### customize webforms
// 00. Make sure `webforms` module is install in drupal
// 01. login as admin and go into `structure > webforms`.
// 02. find the row of your form, click `build` on the far right
// 03. click on `+ Add Element` button near top of table
// 04. in filter input box, type `container`, then click `Add Element`
// 05. in the "Key" input field, type in something descriptive. I reccommend `{FORMNAME}__group_{#}`. Replace `{FORMNAME}` with the form name and `{#}` with a number. ex: `myform__group_2`
// 06. now, click on the `Advanced` tab near the top.
// 07. now click in the input field `Element CSS Classes`. Select `Custom`.
// 08. a new input field shows up underneath. type in one of the following classes:
@taivu
taivu / _icons.scss
Created October 11, 2017 17:24
vudu style - icons sprite
$icon-size: 5.417em; //65px
.icon {
transition: transform .25s ease;
width: $icon-size;
height: $icon-size;
display: inline-block;
background-image: url('../img/sprite-icons.svg'); // icons are 75x75
background-position: 0 0;
background-size: auto 100%;
@taivu
taivu / js-css3-animate-max-height.js
Last active September 21, 2017 21:00
Vanilla JS + CSS3 Animate: open and close using max-height
// https://developer.mozilla.org/en-US/docs/Web/API/Element/classList
// https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollHeight
function toggleHider() {
var hiderToggle = document.getElementsByClassName('hider__toggle')[0];
hiderToggle.classList.toggle('is-open');
var hiderContent = document.getElementsByClassName('hider__content')[0];

Keybase proof

I hereby claim:

  • I am taivu on github.
  • I am taivu (https://keybase.io/taivu) on keybase.
  • I have a public key ASCxwiW-Rw1zttVq5N1m_2XN8MZgw9FQLfzMu1yttE-4wgo

To claim this, I am signing this object: