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
| /** | |
| * Get Local IP Address | |
| * | |
| * @returns Promise Object | |
| * | |
| * getLocalIP().then((ipAddr) => { | |
| * console.log(ipAddr); // 192.168.0.122 | |
| * }); | |
| */ | |
| function getLocalIP() { |
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
| Validate Subsequence | |
| Two Number Sum | |
| Sorted Squared Array | |
| Tournament Winner | |
| Non-Constructible Change | |
| Find Closest Value In BST | |
| Branch Sums | |
| Node Depths | |
| Evaluate Expression Tree | |
| Depth-first Search |
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
| package main | |
| import ( | |
| "database/sql" | |
| "fmt" | |
| "os" | |
| _ "github.com/mattn/go-adodb" | |
| ) |
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
| package main | |
| import "os" | |
| func makeDirectoryIfNotExists(path string) error { | |
| if _, err := os.Stat(path); os.IsNotExist(err) { | |
| return os.Mkdir(path, os.ModeDir|0755) | |
| } | |
| return nil | |
| } |
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
| package main | |
| import ( | |
| "fmt" | |
| "sort" | |
| "strings" | |
| ) | |
| func isAnagram(a string, b string) bool { | |
| if len(a) != len(b) { |
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
| package main | |
| import ( | |
| "fmt" | |
| "syscall" | |
| "unsafe" | |
| "golang.org/x/sys/windows" | |
| ) | |
| var ( |
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 | |
| /** | |
| * Simple request response script | |
| * | |
| * Point you cURL request to this script to see all incoming data | |
| */ | |
| echo '*API*'. PHP_EOL; |
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 | |
| /** | |
| * Determine that url is exists or not | |
| * | |
| * @param $url = The url to check | |
| **/ | |
| function url_exists($url) { | |
| $result = false; | |
| $url = filter_var($url, FILTER_VALIDATE_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
| FROM node:14 | |
| #INSTALL LIBRIRIES (NEEDED FOR STRONG-ORACLE) | |
| RUN apt-get update \ | |
| && ln -fs /usr/share/zoneinfo/America/Manaus /etc/localtime \ | |
| && apt-get install -y libaio1 \ | |
| && apt-get install -y alien \ | |
| && apt-get install -y wget \ | |
| && apt-get install -y build-essential \ | |
| && apt-get install -y unzip \ |
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/bash | |
| TIME=$(date +%s); | |
| FILE=$1 | |
| TMPFILENAME="temp.$TIME.$FILE"; | |
| sed -e 's/<?php.*?>//g' $FILE > $TMPFILENAME; | |
| sed -e '/<?php/,/?>/d' $TMPFILENAME > "$(basename "$FILE" .php).html"; |
NewerOlder