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
<VirtualHost *:80> | |
ServerName www.example.com | |
# For local dev machines | |
ServerAlias staging.www.example.com | |
ServerAlias dev.www.example.com | |
DocumentRoot /var/www/www.example.com | |
<Directory /var/www/www.example.com> | |
Options +FollowSymlinks +Multiviews +Indexes |
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
[ | |
{ | |
"hex": "#EFDECD", | |
"name": "Almond", | |
"rgb": "(239, 222, 205)" | |
}, | |
{ | |
"hex": "#CD9575", | |
"name": "Antique Brass", | |
"rgb": "(205, 149, 117)" |
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
<speak>HOSPITALIZACIONES</speak> |
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
... | |
action_with_slack_notification = %(banaction)s[name=%(__name__)s, bantime="%(bantime)s", port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"] | |
slack[name=%(__name__)s] | |
action = %(action_with_slack_notification)s | |
... |
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
require 'optparse' | |
require 'optparse/time' | |
require 'ostruct' | |
require 'pp' | |
class OptparseExample | |
Version = '1.0.0' | |
CODES = %w[iso-2022-jp shift_jis euc-jp utf8 binary] | |
CODE_ALIASES = { "jis" => "iso-2022-jp", "sjis" => "shift_jis" } |
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
{ | |
"attachments": [ | |
{ | |
"fallback": "test", | |
"color": "#FF8000", | |
"pretext": "This is optional pretext that shows above the attachment.", | |
"text": "This is the text of the attachment. It should appear just above an image of the Mattermost logo. The left border of the attachment should be colored orange, and below the image it should include additional fields that are formatted in columns. At the top of the attachment, there should be an author name followed by a bolded title. Both the author name and the title should be hyperlinks.", | |
"author_name": "Mattermost", | |
"author_icon": "http://www.mattermost.org/wp-content/uploads/2016/04/icon_WS.png", | |
"author_link": "http://www.mattermost.org/", |
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
<!doctype html> | |
<html> | |
<head> | |
<style> | |
html { | |
background: url('./pandora.jpg') no-repeat center center fixed; | |
-webkit-background-size: cover; | |
-moz-background-size: cover; | |
-o-background-size: cover; | |
background-size: cover; |
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
// From http://stackoverflow.com/questions/4770025/how-to-disable-scrolling-temporarily | |
// left: 37, up: 38, right: 39, down: 40, | |
// spacebar: 32, pageup: 33, pagedown: 34, end: 35, home: 36 | |
var keys = [37, 38, 39, 40]; | |
function preventDefault(e) { | |
e = e || window.event; | |
if (e.preventDefault) | |
e.preventDefault(); | |
e.returnValue = false; |
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
fb -[NSException raise] | |
fb -[NSAssertionHandler handleFailureInFunction:file:lineNumber:description:] | |
fb -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] | |
#define NSZombies | |
# this will give you help messages. Set to NO to turn them off. | |
set env MallocHelp=YES | |
# might also be set in launch arguments. | |
set env NSZombieEnabled=YES | |
set env NSDeallocateZombies=NO |
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
egrep -o '([0-9]{1,3}\.){3}[0-9]{1,3}' # finds ips in a file | |
# From http://stackoverflow.com/questions/1444406/how-can-i-delete-duplicate-lines-in-a-file-in-unix/1444448#1444448 | |
# delete duplicate, consecutive lines from a file (emulates "uniq"). | |
# First line in a set of duplicate lines is kept, rest are deleted. | |
sed '$!N; /^\(.*\)\n\1$/!P; D' | |
# delete duplicate, nonconsecutive lines from a file. Beware not to | |
# overflow the buffer size of the hold space, or else use GNU sed. | |
sed -n 'G; s/\n/&&/; /^\([ -~]*\n\).*\n\1/d; s/\n//; h; P' |
NewerOlder