Skip to content

Instantly share code, notes, and snippets.

Bryan Heden hedenface

Block or report user

Report or block hedenface

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@hedenface
hedenface / EqualizerCommand.py
Created May 6, 2018
SublimeText3 Equal-sign Aligner Plugin
View EqualizerCommand.py
# put in ~/.config/sublime-text-3/Packages/User/EqualizerCommand.py
#
# I use the following keybindings (Preferences > Key-Bindings > ('User' bindings - on the right side)):
#
# {
# "keys": ["ctrl+shift+e"],
# "command": "equalizer"
# }
#
# Given a selection of text in the edit view, it will align all of the right-most
@hedenface
hedenface / nagios.sublime-syntax
Created Mar 30, 2018
Nagios Configuration Syntax for Sublime Text 3
View nagios.sublime-syntax
%YAML 1.2
---
name: Nagios Configuration
file_extensions:
- cfg
scope: text.nagios
contexts:
main:
# Macros begin and end with $ and are all capital letters (and underscore and numbers)
@hedenface
hedenface / shared_mem_buffer.c
Created Mar 29, 2018
Shared memory buffer between two processes
View shared_mem_buffer.c
/*****************************
*
* shared_mem_buffer.c
*
* Compile:
* gcc shared_mem_buffer.c -lpthread -lrt -o shared_mem_buffer
*
* Execute:
* ./shared_mem_buffer
*
@hedenface
hedenface / queue.c
Created Mar 17, 2018
Kernel Message Queue Example
View queue.c
/*****************************
*
* queue.c
*
* Compile:
* gcc queue.c -o queue
*
* Execute:
* ./queue
*
@hedenface
hedenface / basic_flock_example.php
Created Feb 27, 2018
php: Basic flock() example
View basic_flock_example.php
<?php
/*
basic flock() example
1. open 2 terminals
2. in first terminal, execute `./basic_flock_example.php --first`
3. then *quickly* in second terminal, execute `./basic_flock_example --second`
4. once both have finished, view the output file: `cat file`
You can’t perform that action at this time.