Skip to content

Instantly share code, notes, and snippets.

View nlaitchison's full-sized avatar
🐱

Nicole Aitchison nlaitchison

🐱
View GitHub Profile
#! /bin/bash
# =====================================================
# * macOS Maintenance Script *
# * Written by Kristan M. Kenney (iCeFuSiOn) *
# * Modified by Mike Wilkie (github.com/MikeWilkie) *
# * Last modified on May 1, 2018 06:05:18 PM EST *
# * Revision 1.0.1c *
# * For use on macOS 10.13 High Sierra Only! *
# * I AM NOT RESPONSIBLE IF YOU DO SOMETHING WRONG! *
#!/bin/bash
# To install:
# add to ~/Scripts/
# add "alias brewup='~/Scripts/brewup.sh'" to ~/.bash_profile
brew update -a; brew upgrade -a; brew prune; brew cleanup; brew cu -a -y; brew cask cleanup; brew doctor;
@tony-caffe
tony-caffe / Contract Killer 3.md
Last active June 12, 2024 17:44
The latest version of Bytes Unlimited ‘Contract Killer’ for web professionals

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Revised by Bytes Unlimited : Feb 3rd 2020

@timneutkens
timneutkens / README.md
Last active April 15, 2021 12:10
Magento2 | Execute data-mage-init and x-magento-init in dynamic content (ajax request)

Execute data-mage-init and x-magento-init in dynamic content (ajax response)

Trigger .trigger('contentUpdated') on the element where dynamic content is injected.

$.ajax({
    url: 'https://www.example.com',
    method: 'POST',
    data: {
 id: '1'
@arthurattwell
arthurattwell / dialog.html
Last active August 1, 2022 09:54
Google Sheets script to allow multi-select in cells with data-validation (adapted from https://www.youtube.com/watch?v=dm4z9l26O0I)
<div style="font-family: sans-serif;">
<? var data = valid(); ?>
<form id="form" name="form">
<? if(Object.prototype.toString.call(data) === '[object Array]') { ?>
<? for (var i = 0; i < data.length; i++) { ?>
<? for (var j = 0; j < data[i].length; j++) { ?>
<input type="checkbox" id="ch<?= '' + i + j ?>" name="ch<?= '' + i + j ?>" value="<?= data[i][j] ?>"><?= data[i][j] ?><br>
<? } ?>
<? } ?>
<? } else { ?>
@wholypantalones
wholypantalones / stateprov.json
Created April 1, 2014 15:17
US States And Canadian Provinces In JSON format
[{
"name": "Alabama",
"abbreviation": "AL"
}, {
"name": "Alaska",
"abbreviation": "AK"
}, {
"name": "American Samoa",
"abbreviation": "AS"
}, {
@stuart11n
stuart11n / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@marcedwards
marcedwards / high-dpi-media.css
Last active February 17, 2026 07:58
A CSS media query that captures almost all high DPI aware devices.
/* ---------------------------------------------------------- */
/* */
/* A media query that captures: */
/* */
/* - Retina iOS devices */
/* - Retina Macs running Safari */
/* - High DPI Windows PCs running IE 8 and above */
/* - Low DPI Windows PCs running IE, zoomed in */
/* - Low DPI Windows PCs and Macs running Firefox, zoomed in */
/* - Android hdpi devices and above */