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
worker_processes auto; | |
events { | |
# Allows up to 1024 connections, can be adjusted | |
worker_connections 1024; | |
} | |
# RTMP configuration | |
rtmp { | |
server { | |
listen 1935; # Listen on standard RTMP port |
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
# Start within ssh | |
dbexport | |
logout | |
homestead halt | |
vagrant box update | |
vagrant destory | |
vagrant up | |
homestead ssh | |
dbimport |
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
public abstract class Logger : IDisposable | |
{ | |
private LogVerbosity _verbosity; | |
private Queue<Action> _queue = new Queue<Action>(); | |
private ManualResetEvent _hasNewItems = new ManualResetEvent(false); | |
private ManualResetEvent _terminate = new ManualResetEvent(false); | |
private ManualResetEvent _waiting = new ManualResetEvent(false); | |
private Thread _loggingThread; | |
private static readonly Lazy<Logger> _lazyLog = new Lazy<Logger>(() => { |
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
# Metadata | |
/.buildpath | |
/.cache | |
/.metadata | |
/.project | |
/.settings | |
atlassian* | |
/nbproject | |
/sitemap | |
/.idea |
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
{% comment %} | |
Source: https://gist.github.com/davelowensohn/98b386c58ba09c00fa552e00a47d93ab | |
Forked from: https://gist.github.com/carolineschnapp/9122054 | |
If you are not on a collection page, do define which collection to use in the order form. | |
Use the following assign statement, replace 'your-collection-handle-here' with your collection handle. | |
{% assign collection = collections.your-collection-handle-here %} | |
Use the assign statement outside of this comment block at the top of your template. | |
{% endcomment %} | |
{% paginate collection.products by 100 %} |
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
$.fn.moreless = function(options){ | |
var settings = { | |
'showChar': 100, | |
'ellipsestext': "...", | |
'moretext': "Show more >", | |
'lesstext':"Show less" | |
}; | |
if (options) { | |
$.extend(settings, options); | |
} |
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 | |
/** | |
* Gera a paginação dos itens de um array ou collection. | |
* | |
* @param array|Collection $items | |
* @param int $perPage | |
* @param int $page | |
* @param array $options | |
* | |
* @return LengthAwarePaginator |
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
<script>console.log({{ product | json }});</script> |
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
{% comment %} | |
Source: https://gist.github.com/carolineschnapp/9122054 | |
If you are not on a collection page, do define which collection to use in the order form. | |
Use the following assign statement, replace 'your-collection-handle-here' with your collection handle. | |
{% assign collection = collections.your-collection-handle-here %} | |
Use the assign statement outside of this comment block at the top of your template. | |
{% endcomment %} | |
{% paginate collection.products by 100 %} |
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 | |
$countries = array | |
( | |
'AF' => 'Afghanistan', | |
'AX' => 'Aland Islands', | |
'AL' => 'Albania', | |
'DZ' => 'Algeria', | |
'AS' => 'American Samoa', | |
'AD' => 'Andorra', |
NewerOlder