Skip to content

Instantly share code, notes, and snippets.

View Huseyinnurbaki's full-sized avatar
🌪️

Hüseyin Nurbaki Huseyinnurbaki

🌪️
View GitHub Profile
const axios = require("axios");
async function findHardcodedEmails(repos) {
const emails = new Set();
for (const repo of repos) {
try {
const response = await axios.get(
`https://api.github.com/search/code?q=email+in:file+repo:${repo}`
);
FROM golang:1.17 AS builder
WORKDIR /src
COPY . .
RUN go mod download
RUN go build -o /app .
FROM debian:buster-slim
COPY --from=builder /app /app
EXPOSE 4000
@Huseyinnurbaki
Huseyinnurbaki / NestJS-Dockerfile
Last active September 25, 2021 08:05
K8S Deployment Manifest
FROM node:12.14.1-alpine AS BASEIMAGE
WORKDIR /src
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run prebuild && npm run build && npm prune --production
FROM node:12.14.1-alpine
@Huseyinnurbaki
Huseyinnurbaki / useGeoLocation.js
Created August 27, 2021 16:51
react native geolocation hook
import { useState, useEffect } from 'react';
import Geolocation from '@react-native-community/geolocation';
export const useGeoLocation = () => {
const [coordinates, setCoordinates] = useState();
let mounted = true;
let watchId;
const onEvent = (event) => {