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
/** | |
* Converts an HTTP(S) url to a WS(S) URL | |
* Example: | |
* httpUrlToWebSockeUrl("http://www.example.com/") -> ws://www.example.com/ | |
* httpUrlToWebSockeUrl("https://www.example.com/") -> wss://www.example.com/ | |
* | |
* @param {string} url | |
* @return {string} | |
*/ | |
function httpUrlToWebSockeUrl(url) |
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
import argparse | |
import requests | |
import time | |
import json | |
def main(): | |
""" | |
Entry point of the application | |
:return: void |
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
/^(?:W(?:[H]+)?(?:[UA])[ZS]+[A]+(?:[H]+)?)(?:[\?\!\.\@]+)?$/ig |
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 | |
/** | |
* Parses a template argument to the specified value | |
* Template variables are defined using double curly brackets: {{ [a-zA-Z] }} | |
* Returns the query back once the instances has been replaced | |
* @param string $string | |
* @param string $find | |
* @param string $replace | |
* @return 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
/** | |
* Format double braced template string | |
* @param {string} string | |
* @param {string} find | |
* @param {string} replace | |
* @returns {string} | |
*/ | |
function findReplaceString(string, find, replace) | |
{ | |
if ((/[a-zA-Z\_]+/g).test(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
git log --all | grep -E -o "\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,6}\b" | sort -u |
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.Collections.Generic; | |
using Facebook; | |
using FacebookAds; | |
using FacebookAds.Object; | |
using FacebookAds.Object.Fields; | |
namespace FacebookAdsExamples | |
{ |
NewerOlder