Skip to content

Instantly share code, notes, and snippets.

View matgargano's full-sized avatar

Mat Gargano matgargano

View GitHub Profile
@felipecsl
felipecsl / restart coreaudio daemon
Last active March 16, 2025 22:43
Restart Mac OS X coreaudio daemon. Useful if you cannot change the audio output device to Airplay.
sudo kill `ps -ax | grep 'coreaudiod' | grep 'sbin' |awk '{print $1}'`
# or...
sudo killall coreaudiod
body {
padding:100px;
}
.top {
position:absolute;
top:0;
left:0;
}
/**
* plugin.js
*
* Copyright, Moxiecode Systems AB
* Released under LGPL License.
*
* License: http://www.tinymce.com/license
* Contributing: http://www.tinymce.com/contributing
*/
@matgargano
matgargano / gist:fea6c14f694f724a8c6d
Created July 2, 2014 13:26
add local ssh key to remote server
cat ~/.ssh/id_rsa.pub | ssh [email protected] "cat >> ~/.ssh/authorized_keys"
@chanified
chanified / twbs-grid-xl
Created October 15, 2014 03:05
Twitter Bootstrap col-xl less file
// XL screen
@screen-xl: 1600px;
@screen-xl-min: @screen-xl;
@screen-xl-hughdesktop: @screen-xl-min;
// So media queries don't overlap when required, provide a maximum
@screen-lg-max: (@screen-xl-min - 1);
//Container sizes
// Large screen / wide desktop
@ericelliott
ericelliott / essential-javascript-links.md
Last active March 22, 2025 17:28
Essential JavaScript Links
@nienkedekker
nienkedekker / phpstorm-cs-fixer.md
Last active February 2, 2024 03:09
Set up PHP-CS-Fixer in PHPStorm

Use PHP-CS-Fixer in PHPStorm

  • Install PHP-CS-Fixer on your local machine according to these instructions: https://github.com/FriendsOfPHP/PHP-CS-Fixer
  • Open PHPStorm, Preferences > Tools > External Tools and enter these values: img
  • Program, edit to match your path where PHP-CS-Fixer lives: /.composer/vendor/friendsofphp/php-cs-fixer/php-cs-fixer
  • Parameters: --rules=@PSR2 --verbose fix $FileDir$/$FileName$. Note that previous verions of PHP-CS-Fixer used --levels instead of --rules.
  • Working directory: $ProjectFileDir$

Click OK and Apply. Now we'll set up a shortcut.

  • Go to Preferences > Keymap and search for "PHP Fixer" (or whatever name you gave it). Add whatever shortcut you like, I'm using ctrl + cmd + ]:
@cliffordp
cliffordp / functions.php
Last active September 8, 2022 14:31
Event Tickets Plus - Add other WooCommerce Product to Cart when WooCommerce Ticket is added to cart
<?php
/**
* Event Tickets Plus - Add other WooCommerce Product to Cart when WooCommerce Ticket is added to cart
*
* @link https://wordpress.org/plugins/woocommerce-product-dependencies/ May be a better and easier solution !!! !!! !!! (But I haven't tried it.)
*
* !!! Before using, edit the variables in this function according to your needs!!!
* Could maybe also do the inverse (if ticket product is removed from cart, also remove the chained product).
*
* From https://gist.github.com/cliffordp/30481ca323012e298418095476d49337
<?php
/**
* Save Work ID
*
* Save work ID on the fly when adding new post.
*
* @param string $post_id Post ID.
*
* @return array $_POST Post Data.
@jaredatch
jaredatch / mailhog-mamp.md
Created January 30, 2018 21:57
Install MailHog with MAMP Pro

Install MailHog with MAMP Pro, using HomeBrew.

MailHog

First let's make sure HB is updated. Open up terminal for the following steps.

$ brew update