Skip to content

Instantly share code, notes, and snippets.


Greg Haygood greghaygood

View GitHub Profile
Landish /
Last active Jun 15, 2022


  "compilerOptions": {
    "baseUrl": "./src",
    "target": "ES6",
    "jsx": "preserve",
    "allowSyntheticDefaultImports": true
 "exclude": ["build", "node_modules"]
pandafulmanda / Python3 Virtualenv
Last active Jul 12, 2022 — forked from akszydelko/Python3 Virtualenv
Setting up and using Python3 Virtualenv on Mac
View Python3 Virtualenv

Python3 Virtualenv Setup

  • Python 3
  • Pip 3
$ brew install python3
marcj /
Last active Apr 12, 2020
OSX PhpStorm, better performance - more FPS using OpenGL
cp /Applications/ ~/Library/Preferences/WebIde*
echo -ne "\n-Dawt.useSystemAAFontSettings=lcd\n-Dawt.java2d.opengl=true" >> ~/Library/Preferences/WebIde*/phpstorm.vmoptions
kevinelliott /
Last active Apr 10, 2022
Mac OS X 10.11 El Capitan Setup

Mac OS X 10.11 El Capitan

Custom recipe to get OS X 10.11 El Capitan running from scratch, setup applications and developer environment. This is very similar (and currently mostly the same) as my 10.10 Yosemite setup recipe (as found on this gist Note that I expect this to change significantly as I install El Capitan several times.

I use this gist to keep track of the important software and steps required to have a functioning system after a semi-annual fresh install. On average, I reinstall each computer from scratch every 6 months, and I do not perform upgrades between distros.

This keeps the system performing at top speeds, clean of trojans, spyware, and ensures that I maintain good organizational practices for my content and backups. I highly recommend this.

You are encouraged to fork this and modify it to your heart's content to match your own needs.

mwalczak /
Last active May 2, 2022
Migrating Zabbix with MySQL backend to a new machine

Today I've solved the problem of one server being to slow to handle the growth of my zabbix configuration. I'm using zabbix-server 2.2.2 with MySQL/Debian backend and around 20 zabbix-agents with Debian installed.

Let's say old Zabbix server IP is: A.B.C.D and new is: U.X.Y.Z. The domain name for the instalation will be:

Below you will find all steps to migrate your configuration:

Ensure all agents will accept connections from the new IP Modify each agent configuration file (in debian: /etc/zabbix/zabbix_agentd.conf) and add new IP

kosinix / custom-nav-walker-usage.php
Last active Mar 8, 2022
WordPress: Using a custom nav walker to create navigation menus in plain <a> tags. That is the <ul> and <li> tags are not present. Very useful if you want to create simple links that can be centered with a simple text-align:center on the containing element.
View custom-nav-walker-usage.php
// In your template files like footer.php
// The items_wrap value ('%3$s') removes the wrapping <ul>, while the custom walker (Nav_Footer_Walker) removes the <li>'s.
wp_nav_menu(array('items_wrap'=> '%3$s', 'walker' => new Nav_Footer_Walker(), 'container'=>false, 'menu_class' => '', 'theme_location'=>'footer', 'fallback_cb'=>false ));
chrisjlee / drupal-views-share-global-text-field
Last active Apr 25, 2022
share url's for facebook, twitter, pinterest with just get variables
View drupal-views-share-global-text-field
<li class="share-text">Share this>/li>
<li class="share-tw"><a href="[title]"><span></span></a></li>
<li class="share-fb"><a href="[nid]&p=[title]"><span></span></a></li>
<li class="share-pinterest"><a href="[nid]&description=[title]"><span></span></a></li>
pocketkk / lcd.rb
Created Jan 12, 2013
Ruby Library for Parallax 16 x 2 Serial LCD for Raspberry Pi
View lcd.rb
# Wiring Diagram
# ****************************
# pin 8 (TX) -------> RX
# pin 6 (GND) -------> GND
# pin 2 (5V) -------> 5V
View mq.css
@media only screen and (min-width: 320px) {
/* Small screen, non-retina */
only screen and (-webkit-min-device-pixel-ratio: 2) and (min-width: 320px),
only screen and ( min--moz-device-pixel-ratio: 2) and (min-width: 320px),
only screen and ( -o-min-device-pixel-ratio: 2/1) and (min-width: 320px),
kconragan /
Last active Jul 9, 2022
Enable key repeat in Apple Lion for Sublime Text in Vim mode
# Mac OS X Lion introduced a new, iOS-like context menu when you press and hold a key
# that enables you to choose a character from a menu of options. If you are on Lion
# try it by pressing and holding down 'e' in any app that uses the default NSTextField
# for input.
# It's a nice feature and continues the blending of Mac OS X and iOS features. However,
# it's a nightmare to deal with in Sublime Text if you're running Vintage (Vim) mode,
# as it means you cannot press and hold h/j/k/l to move through your file. You have
# to repeatedly press the keys to navigate.