Skip to content

Instantly share code, notes, and snippets.

@o-az
o-az / auto-commit.yml
Last active July 19, 2024 10:51
This GitHub Action automatically formats code using Prettier when a pull request is opened or updated. It then commits and pushes the formatted code back to the same PR branch, ensuring consistent code style across contributions without manual intervention.
name: 'Auto Commit Prettier'
on:
pull_request:
branches: ['main']
jobs:
auto-commit:
name: 'Auto Commit'
runs-on: ['ubuntu-latest']
/**
* stripNulls
* https://gist.github.com/erikpukinskis/52e5e72f3625c89adc3b84e5b679deff
*
* Copyright 2023 Erik Pukinskis
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the “Software”), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
@nicolasdao
nicolasdao / terminal_emojis.md
Last active July 10, 2024 23:07
Terminal emojis. Keywords: terminal console symbol emoji emoticon icon
Emoji Name Text example
🚀 Rocket You're up
📦 Package Installing additional dependencies...
Hook Running completion hooks...
📄 Document Generating README.md...
🎉 Party Successfully created project hello-vue.
👉 Next Get started with the following commands:
Tick Task completed
Magic Assembling project...
@michalblaha
michalblaha / vaclav-havel.svg
Created June 7, 2019 06:37
Vaclav Havel se srdcem
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kentbrew
kentbrew / lang_chrome_osx.md
Last active July 16, 2024 15:03
How to change the Chrome default language on OSX

How to Change your Chrome Default Language

Open up a Terminal window. (If you have never seen Terminal before, go to Spotlight Search and type "Terminal.")

In the Terminal box, try this:

defaults read com.google.Chrome AppleLanguages

If you see this:

@OliverJAsh
OliverJAsh / foo.md
Created December 8, 2017 11:29
Avoiding CSS overrides in responsive components

Avoiding CSS overrides in responsive components

I would like to demonstrate some of the benefits of scoped styles over mobile-first CSS with overrides for wider breakpoints. I'll start by explaining the two approaches, before listing the benefits.

Mobile-first with overrides for wider breakpoints

h2 {
  color: black;
 font-size: 2em;
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active July 22, 2024 06:03
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@kottenator
kottenator / simple-pagination.js
Created July 13, 2015 20:44
Simple pagination algorithm
// Implementation in ES6
function pagination(c, m) {
var current = c,
last = m,
delta = 2,
left = current - delta,
right = current + delta + 1,
range = [],
rangeWithDots = [],
l;
@pklaus
pklaus / AlwaysMountRootFSWithNoatime_MacOSX.sh
Created April 20, 2011 15:08
SSD Optimizations of Mac OS X 10.6 Operating System
#!/bin/bash
# +----------------------------------------------------------------------+
# | |
# | Mount the root file system / with the option noatime |
# | |
# | By Philipp Klaus <http://blog.philippklaus.de> |
# | Tip found on <http://blogs.nullvision.com/?p=275> |
# | |
# +----------------------------------------------------------------------+