This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
1. compile with: `gcc -Wall -o demo.cgi demo.c` | |
2. ensure your cgi is enabled (`sudo a2enmod cgi` if using apache) | |
3. copy demo to your cgi-bin (possibly /usr/lib/cgi-bin/) (check your | |
server configuration) | |
4. load page (http://localhost/cgi-bin/demo.cgi?key1=val1&key2=val2) | |
*/ | |
#include <stdio.h> | |
#include <stdlib.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/***************************** | |
* | |
* queue.c | |
* | |
* Compile: | |
* gcc queue.c -o queue | |
* | |
* Execute: | |
* ./queue | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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` |