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
using System; | |
using System.Linq; | |
using System.Text; | |
namespace ConsoleApp1 | |
{ | |
class Program | |
{ | |
public static string Base62EncodeInt(int Original) | |
{ |
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 | |
/** | |
* REST test scripts | |
* @license MIT | |
*/ | |
class Request { | |
public $protocol; | |
public $host; | |
public $path; |
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
/** | |
* This function returns whether the given values are valid measurements. | |
* | |
* @param string|string[] inputArray List or string of measures | |
* @param string|string[] validUnits List or string of valid units | |
* @param mixed opts Options | |
* @return boolean Whether measure(s) is valid | |
*/ | |
function checkValidUnits(inputArray, validUnits, opts) { |
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
import 'core-js'; | |
import React from 'react'; | |
const matchAll = require('string.prototype.matchall'); | |
interface iTagObject { | |
name: string, | |
attributes: any, | |
content: any | |
} |
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
# -*- coding: utf-8 -*- | |
# | |
# Used like this: | |
# | |
# from repermute import ipermute | |
# | |
# for s in ipermute('[A-Z]\d'): | |
# print s | |
# | |
# Almost all regular expression constructs are supported except for '*' |
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
/** | |
* Tags by Argument | |
* | |
* Creates a HTML string from the element name, attributes and content given | |
* as part of the arguments provided. | |
* | |
* The name argument can be null, which will produce a standard div element. | |
* If the name is prefixed with a hash, and an id is not provided as an | |
* attribute, then the id attribute will be added. Classes can be described | |
* by using dot notation and will get prefixed to the class attribute. This |
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
Promise = function(fn) { | |
var value = undefined; | |
var stack = []; | |
var state = 'pending' | |
var triggered = false; | |
var error = undefined; | |
var id = (function (len, chars) { | |
len = len || 10; | |
chars = chars || "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; | |
var text = ""; |
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
/** | |
* isValidColor | |
* Tests whether a given color is in a valid format when used for CSS/form validation. | |
* Mostly written by copying colors and regexes (because of laziness, and it's been | |
* written n-times before). | |
* | |
* @author Matthew | |
* @copyright MIT 2019+ | |
*/ | |
var isValidColor = function(color) { |
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
import time | |
import sys | |
import datetime | |
from os.path import isfile as file_exists | |
from os import remove as file_delete | |
import os | |
from ping3 import ping | |
import signal | |
import sys |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading; | |
using System.Net; | |
using System.Diagnostics; | |
using System.Net.Sockets; | |
// Created a temporary web server as part of a payment SDK example |
NewerOlder