Skip to content

Instantly share code, notes, and snippets.

@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> |
# | |
# +----------------------------------------------------------------------+
@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;
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active November 16, 2024 03:35
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

@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;
@kentbrew
kentbrew / lang_chrome_osx.md
Last active August 19, 2024 13:38
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:

@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.
@nicolasdao
nicolasdao / terminal_emojis.md
Last active November 7, 2024 07:44
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...
/**
* 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
@o-az
o-az / auto-commit.yml
Last active September 7, 2024 22:29
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']