Skip to content

Instantly share code, notes, and snippets.

View the-glima's full-sized avatar
🎧
Helping robots to steal all jobs

Gabriel Lima the-glima

🎧
Helping robots to steal all jobs
View GitHub Profile
@parmentf
parmentf / GitCommitEmoji.md
Last active April 26, 2024 09:53
Git Commit message Emoji
@benlinton
benlinton / multiple_mysql_versions_for_development.md
Last active September 23, 2023 09:38
Multiple MySQL Versions with Homebrew

Multiple MySQL Versions for Development

Options included below:

  • Using Docker docker-compose
  • Using Homebrew brew

Using Docker (recommended)

This gist was originally created for Homebrew before the rise of Docker, yet it may be best to avoid installing mysql via brew any longer. Instead consider adding a barebones docker-compose.yml for each project and run docker-compose up to start each project's mysql service.

@rveitch
rveitch / sass-7-1-pattern.scss
Last active April 23, 2024 08:10
Sass 7-1 Pattern
sass/
|
|– base/
| |– _reset.scss # Reset/normalize
| |– _typography.scss # Typography rules
| ... # Etc…
|
|– components/
| |– _buttons.scss # Buttons
| |– _carousel.scss # Carousel
@developit
developit / README.md
Last active March 21, 2022 21:32
Webpack Starter Template

Webpack Starter Template

This is a basic Webpack project template for a web app written in ES6 & LESS.

This assumes you have a directory structure as follows:

package.json
webpack.config.js
src/
@SleepWalker
SleepWalker / swipe.js
Created September 30, 2015 04:59
A simple swipe detection on vanilla js
var touchstartX = 0;
var touchstartY = 0;
var touchendX = 0;
var touchendY = 0;
var gesuredZone = document.getElementById('gesuredZone');
gesuredZone.addEventListener('touchstart', function(event) {
touchstartX = event.screenX;
touchstartY = event.screenY;
@rponte
rponte / get-latest-tag-on-git.sh
Last active March 11, 2024 07:50
Getting latest tag on git repository
# The command finds the most recent tag that is reachable from a commit.
# If the tag points to the commit, then only the tag is shown.
# Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object
# and the abbreviated object name of the most recent commit.
git describe
# With --abbrev set to 0, the command can be used to find the closest tagname without any suffix:
git describe --abbrev=0
# other examples
@function up-to($list, $index) {
$l: ();
@each $e in $list {
@if length($l) < $index {
$l: append($l, $e, list-separator($list));
}
}
@return $l;
}

Setup Mac OS X (Sierra)

1. Run Software Update

Make sure everything is up to date.

2. Install Xcode and its "Command Line Tools"

  1. Go to App Store and install Xcode.
@nickautomatic
nickautomatic / cmder.md
Last active September 20, 2023 13:59
Setting up Cmder to use bash by default

Set up cmder to use msysgit / bash by default

  • Install cmder_mini (msysgit is already installed, so no need for full version)
  • In Cmder, open settings: Win + Alt + P
  • Under Startup > Tasks, add a task called {bash} with the following settings:
    • Task parameters (set icon):
      • For Cmder icon: /icon "%CMDER_ROOT%\cmder.exe"
      • For Git icon: /icon "C:\Program Files (x86)\Git\etc\git.ico"
    • Commands (open Git's bash shell):
  • "C:\Program Files (x86)\Git\bin\sh.exe" -l -new_console:d:%USERPROFILE%
@simonausten
simonausten / reset.css
Last active May 14, 2022 01:56
Email CSS Reset
<style type="text/css">
/****** EMAIL CLIENT BUG FIXES - BEST NOT TO CHANGE THESE ********/
.ExternalClass {
width: 100%;
}
/* Forces Outlook.com to display emails at full width */
.ExternalClass, .ExternalClass p, .ExternalClass span, .ExternalClass font, .ExternalClass td, .ExternalClass div { line-height: 100%; }
/* Forces Outlook.com to display normal line spacing, here is more on that: http://www.emailonacid.com/forum/viewthread/43/ */