Skip to content

Instantly share code, notes, and snippets.

View Lego2012's full-sized avatar

Leo Merkel Lego2012

View GitHub Profile
@Lego2012
Lego2012 / navbar.astro
Created November 30, 2023 17:42 — forked from leabs/navbar.astro
Astro - Set active class on Navbar component.
<!--Set active class on nav when the page is active -->
<script>
const nav = document.querySelector(".navbar");
const navLinks = nav.querySelectorAll("a");
const currentURL = window.location.href;
navLinks.forEach((link) => {
if (link.href === currentURL) {
link.classList.add("active");
}
});
@Lego2012
Lego2012 / vscode_shortcuts.md
Created November 2, 2019 12:11 — forked from bradtraversy/vscode_shortcuts.md
Helpful shortcuts for VSCode

VSCode Shortcuts

List of helpful shortcuts for faster coding

Official List of all commands

Open/View

@Lego2012
Lego2012 / .bash_profile
Created August 8, 2018 18:23 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
@Lego2012
Lego2012 / nvm-install.sh
Created May 19, 2018 19:09 — forked from snandam/nvm-install.sh
Remove node, npm, nvm and install again
#!/bin/bash
# node-reinstall
# credit:
# http://stackoverflow.com/a/11178106/2083544
# https://gist.github.com/brock/5b1b70590e1171c4ab54
## program version
## Update versions accordingly. https://github.com/creationix/nvm/releases
VERSION="0.31.0"
@Lego2012
Lego2012 / git-version-control.markdown
Created December 22, 2016 08:22 — forked from albatrocity/git-version-control.markdown
Some basic Git instructions for Github for Mac and the command line

Using Git version control for code projects

Creating a new code repo from a local working copy

  1. From the repositories view in the app, drag the project folder to the bottom of the left sidebar.
  2. Hit "Yes" when it asks if you want to create a local git repository
  3. Go to "Changes" view (⌘2)
  4. Select the files that you want to commit their current state to the repository. You can view the changes of the file by clicking on the double up arrow on the file name bar.
@Lego2012
Lego2012 / bootstrap-customizer-config.json
Created December 22, 2016 08:20 — forked from anonymous/config.json
Bootstrap Customizer Config
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",
@Lego2012
Lego2012 / archive_gen.rb
Last active September 18, 2017 14:11 — forked from diasjorge/archive_gen.rb
Jekyll Archive #jekyll
# Code based on http://mikewest.org/2009/11/my-jekyll-fork
module Jekyll
module Filters
def to_month(input)
return Date::MONTHNAMES[input.to_i]
end
def to_month_abbr(input)
@Lego2012
Lego2012 / gulpfile.js
Last active September 18, 2017 14:43 — forked from demisx/gulpfile.js
Gulp 4 gulpfile.js #gulp
// Gulp 4
var gulp = require('gulp');
var using = require('gulp-using');
var grep = require('gulp-grep');
var changed = require('gulp-changed');
var del = require('del');
var coffee = require('gulp-coffee');
var less = require('gulp-less');
var coffeelint = require('gulp-coffeelint');
var sourcemaps = require('gulp-sourcemaps');