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
| input { | |
| syslog { | |
| port => 12345 | |
| type => "docker" | |
| } | |
| } | |
| output { | |
| elasticsearch { | |
| hosts => [ "elasticsearch" ] |
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
| using UnityEngine; | |
| using System.Collections; | |
| using Newtonsoft.Json; | |
| /// <summary> | |
| /// The Geo data for a user. | |
| /// | |
| /// http://ip-api.com/docs/api:json | |
| /// |
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
| #!/bin/sh | |
| # LOGIC: | |
| # | |
| # 1. Find all *.ts files the current directory and all subdirectories | |
| # | |
| # for f in $(find . -name '*.ts'); | |
| # | |
| # 2. Loop through all files and do an action | |
| # |
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
| b64toBlob(b64Data, contentType, sliceSize) { | |
| contentType = contentType || ''; | |
| sliceSize = sliceSize || 512; | |
| let byteCharacters = atob(b64Data); | |
| let byteArrays = []; | |
| for (let offset = 0; offset < byteCharacters.length; offset += sliceSize) { | |
| let slice = byteCharacters.slice(offset, offset + sliceSize); | |
| let byteNumbers = new Array(slice.length); |
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
| <?php | |
| /** | |
| * Shortcode for creating a dropdown for all brands. | |
| * | |
| * Doc: | |
| * https://codex.wordpress.org/Function_Reference/wp_dropdown_categories | |
| * | |
| * Inspiration: |
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
| /** | |
| * https://github.com/woocommerce/woocommerce/issues/9724#issuecomment-160618200 | |
| */ | |
| function custom_track_product_view() { | |
| if ( ! is_singular( 'product' ) ) { | |
| return; | |
| } | |
| global $post; |
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
| <?php | |
| /* | |
| Wordpress leading whitespace fix | |
| ================================ | |
| Ever got the infamous "xml declaration not at start of external | |
| entity" error instead of your RSS feed when using Wordpress? | |
| Well, you're not alone. I've spent couple hours tracking down | |
| which of the active Wordpress plugins/themes broke my RSS feed. |
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
| const GUID_EMPTY: string = '00000000-0000-0000-0000-000000000000'; | |
| const GUID_FORMAT: RegExp = /\{?([a-z0-9]{8}(?:-[a-z0-9]{4}){3}-[a-z0-9]{12})\}?/i; | |
| /** | |
| * A unique identifier. | |
| */ | |
| export class Guid { | |
| private _id: string; |
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
| using System; | |
| using System.Text; | |
| using UnityEngine; | |
| public class LogToScreen : Singleton<LogToScreen> | |
| { | |
| const int Lines = 18; | |
| static string[] _lastItems = new string[Lines]; | |
| static string _message = string.Empty; |
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
| server { | |
| listen 80; | |
| server_name localhost; | |
| root /usr/share/nginx/html; | |
| charset utf-8; | |
| index index.html; |