🧘♂️
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 os | |
from pathlib import Path | |
from sys import argv | |
class ResetTrial: | |
path = str(Path().home()) + "/Library/" | |
file_array = [] | |
dir_array = [] |
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
@echo off | |
:awake | |
cls | |
wmic logicaldisk get FreeSpace, Name, VolumeName | |
timeout /t 10 | |
goto awake |
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
#!/bin/sh | |
echo "==================================" | |
echo "Welcome to Golang + Fiber Project Creator v0.1.0" | |
echo "==================================" | |
echo "For this script, The user have to input the project name (this will use to be the go module name and the project name." | |
echo "" | |
read -n 1 -s -r -p "Press any key to continue" | |
echo "\n" |
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
#!/bin/bash | |
V=$(curl --silent "https://api.github.com/repos/sharkdp/bat/releases/latest" | grep -Eo '"tag_name": "v(.*)"' | sed -E 's/.*"([^"]+)".*/\1/') && curl -sOL "https://github.com/sharkdp/bat/releases/download/$V/bat-$V-x86_64-unknown-linux-musl.tar.gz" && tar xzvf "bat-$V-x86_64-unknown-linux-musl.tar.gz" -C . && sudo sh -c "cp ./bat-$V-x86_64-unknown-linux-musl/bat /usr/local/bin/bat" && rm bat-$V-x86_64-unknown-linux-musl.tar.gz && unset V |
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 nginx:1.17.9 | |
COPY nginx/default.conf /etc/nginx/conf.d/ | |
RUN rm -rf /usr/share/nginx/html/* | |
RUN apt-get -y update | |
WORKDIR /usr/share/nginx/html | |
COPY ./build . | |
CMD ["nginx", "-g", "daemon off;"] |
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
var ( | |
// Bot : For LINE Bot Client Configuration | |
Bot *linebot.Client | |
channelSecret string | |
channelToken string | |
) | |
// SetupLINEConfig : Setup Channel Secret and Channel Token for using in LINE Bot | |
func SetupLINEConfig() { | |
channelSecret = os.Getenv("CHANNEL_SECRET") |
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
// HandleLINEEventMessage : Handle LINE Event Message for LINE Bot Client | |
func HandleLINEEventMessage(event *linebot.Event) { | |
switch message := event.Message.(type) { | |
case *linebot.TextMessage: | |
textIncoming := message.Text | |
log.Println("[INFO]: Text Incoming |", textIncoming) | |
uid := event.Source.UserID | |
log.Println("[INFO]: User ID |", uid) | |
profile := repository.Bot.GetProfile(uid) |
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
// GetTodayPriceForLINEBot : Get today gold price with webhook | |
func GetTodayPriceForLINEBot(w http.ResponseWriter, r *http.Request) { | |
log.Println("------- API: GetTodayPriceForLINEBot -------") | |
defer r.Body.Close() | |
w.Header().Set(contentTypeKey, contentTypeValue) | |
if !isPOST(r) { | |
ResponseMethodNotAllowed(w) | |
return | |
} |
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
# Note: we don't have `run` section because Heroku uses the `CMD` specified in the `Dockerfile` instead | |
build: | |
docker: | |
web: Dockerfile | |
config: | |
ENV: dev |
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
version: "3" | |
services: | |
goldnoti: | |
container_name: goldnoti | |
image: goldnoti:latest | |
ports: | |
- 10999:10999 |
NewerOlder