This file contains hidden or 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
Show hidden characters
{ | |
"cmd": ["perl", "-w", "$file"], | |
"file_regex": ".* at (.*) line ([0-9]*)", | |
"selector": "source.perl" | |
} |
This file contains hidden or 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
———————————————————————————————————————————————————————————————————————————————————————————————————— | |
BBEdit / BBEdit-Lite / TextWrangler Regular Expression Guide Modified: 2018/08/10 01:19 | |
———————————————————————————————————————————————————————————————————————————————————————————————————— | |
NOTES: | |
The PCRE engine (Perl Compatible Regular Expressions) is what BBEdit and TextWrangler use. | |
Items I'm unsure of are marked '# PCRE?'. The list while fairly comprehensive is not complete. |
This file contains hidden or 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
$('#myCarousel').on('slid', function() { | |
var $nextImage = $('.active.item', this).next('.item').find('img'); | |
$nextImage.attr('src', $nextImage.data('lazy-load-src')); | |
}); |
This file contains hidden or 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
/** v6.0 | |
* A pin bar is a hammer like formation where the body of the candle | |
* is at one extreme of the entire candle and the wick making up the | |
* remainder of the candle. The body of the candle should be no more | |
* than 1/3 of the entire candle, with the remaining wick taking up | |
* no more than 2/3 of the remainder of the body. | |
*/ | |
bool isPin( double o, double h, double l, double c, bool isLong ) { | |
double hx, lx, rng = h - l, pct = 1/3; | |
if ( isLong ) { |
This file contains hidden or 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
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
This file contains hidden or 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
Create the remote repository, and get the URL such as | |
[email protected]:/youruser/somename.git or https://github.com/youruser/somename.git | |
If your local GIT repo is already set up, skips steps 2 and 3 | |
Locally, at the root directory of your source, git init | |
Locally, add and commit what you want in your initial repo |
This file contains hidden or 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
/* | |
Serve is a very simple static file server in go | |
Usage: | |
-p="8100": port to serve on | |
-d=".": the directory of static files to host | |
Navigating to http://localhost:8100 will display the index.html or directory | |
listing file. | |
*/ | |
package main |
This file contains hidden or 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
#! /usr/bin/env python | |
import pushover | |
import sys | |
import datetime | |
import dateutil.parser | |
import urllib | |
DUE_URL = "due://x-callback-url/add?title={0}&duedate={1}&timezone=GMT" |
This file contains hidden or 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
#!/usr/bin/env python | |
''' | |
Send an multipart email with HTML and plain text alternatives. The message | |
should be constructed as a plain-text file of the following format: | |
From: Your Name <[email protected]> | |
To: Recipient One <[email protected]> | |
Subject: Your subject line | |
--- |
This file contains hidden or 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
### This file implements a blacklist for certain user agents and | |
### referrers. It's a first line of defense. It must be included | |
### inside a http block. | |
# based from https://github.com/perusio/piwik-nginx/blob/master/blacklist.conf | |
# blacklist from http://perishablepress.com/2013-user-agent-blacklist/ | |
## Add here all user agents that are to be blocked. | |
map $http_user_agent $bad_bot { | |
default 0; |