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
FROM php:7.4-fpm | |
# Install dependencies | |
RUN apt-get update && \ | |
apt-get install -y telnet curl unixodbc unixodbc-dev gnupg2 libgssapi-krb5-2 wget iputils-ping openssl zlib1g-dev libzip-dev sendmail | |
# Add Microsoft repo for SQL Server ODBC Driver | |
RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \ | |
curl https://packages.microsoft.com/config/debian/10/prod.list > /etc/apt/sources.list.d/mssql-release.list |
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
package main | |
import ( | |
"fmt" | |
"log" | |
"net/http" | |
_ "net/http/pprof" // Import for pprof | |
) | |
func main() { |
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
FROM golang:alpine3.18 AS build | |
# Important: | |
# Because this is a CGO enabled package, you are required to set it as 1. | |
ENV CGO_ENABLED=1 | |
RUN apk add --no-cache \ | |
# Important: required for go-sqlite3 | |
gcc \ | |
# Required for Alpine |
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 json | |
import sys | |
def parse_json_to_html(json_data): | |
vulnerabilities = json_data.get('vulnerabilities', []) | |
# Start HTML document | |
html = ''' | |
<html> | |
<head> |
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 java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
public class Scratch { | |
public static void main(String[] args) { | |
String text = "This text contains two JSON strings: {\"key1\": \"value1\"} and {\"key2\": \"value2\"} and {\"key2\": \"value2\"}"; | |
Pattern pattern = Pattern.compile("(\\{.*?\\})"); | |
Matcher matcher = pattern.matcher(text); | |
while (matcher.find()) { |
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 MessageQueue from 'react-native/Libraries/BatchedBridge/MessageQueue.js'; | |
const WHITELIST = ['UIManager']; | |
const NOOP = () => { }; | |
let queue = []; | |
let now = 0; | |
export default { | |
start() { | |
MessageQueue.spy(msg => { |
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
function makeChange (amount) { | |
var change = {}, | |
i = 0, | |
coins = makeChange.COINS, | |
coin; | |
while (amount && (coin = coins[i++])) { | |
if (amount >= coin) { | |
change[coin] = ~~(amount / coin); |
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 dns.resolver #dnspython | |
my_resolver = dns.resolver.Resolver() | |
#Cloudflares DNS Server | |
my_resolver.nameservers = ['1.1.1.1'] | |
#Get IP from cloudflare chaosnet TXT record | |
#https://community.cloudflare.com/t/can-1-1-1-1-be-used-to-find-out-ones-public-ip-address/14971/6 | |
result = my_resolver.resolve("whoami.cloudflare","TXT", "CH", tcp=True, lifetime=15) | |
response = result.response | |
answer = response.answer | |
ExternalIP = str(list(answer[0])[0]).replace('"', '') |
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
class Greeter { | |
@ChangeName('Ammara') | |
greet(greeting: string) { | |
return "Hello, " + greeting; | |
} | |
} | |
function ChangeName(value: string) { | |
return function ( | |
target: 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
package com.touchngo.iap.apigatewayservice; | |
import java.io.IOException; | |
import javax.servlet.Filter; | |
import javax.servlet.FilterChain; | |
import javax.servlet.FilterConfig; | |
import javax.servlet.ServletException; | |
import javax.servlet.ServletRequest; | |
import javax.servlet.ServletResponse; | |
import javax.servlet.http.HttpServletRequest; |
NewerOlder