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
# create /usr/local/bin/monitor_docker.sh | |
# sudo chmod +x /usr/local/bin/monitor_docker.sh | |
#!/bin/bash | |
# Telegram bot settings | |
BOT_TOKEN="your_bot_token_here" | |
CHAT_ID="your_chat_id_here" | |
# Function to send Telegram message |
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 | |
read -p "Please enter domain: " domain | |
read -p "Please enter proxy port: " port | |
echo "Creating server block for $domain" | |
sudo mkdir -p /var/www/$domain | |
sudo chown -R $USER:$USER /var/www/$domain | |
sudo chmod -R 755 /var/www |
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
sudo mkdir -p /var/www/example.com | |
sudo chown -R $USER:$USER /var/www/example.com | |
sudo chmod -R 755 /var/www | |
sudo nano /etc/nginx/sites-available/example.com | |
server { | |
listen 80; | |
listen [::]:80; |
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
# Stage 1: Build the Angular application | |
FROM node:22.3.0-alpine AS build | |
WORKDIR /usr/src/app | |
# Copy package.json and package-lock.json | |
COPY package*.json ./ | |
# Install dependencies | |
RUN npm i |
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 { Injectable } from '@angular/core'; | |
import * as CryptoJS from 'crypto-js'; | |
const SECRET_KEY = 'ooG7ImX5GKl6MQBX7GQU1Swi'; | |
@Injectable({ | |
providedIn: 'root', | |
}) | |
export class StorageService { | |
set(key: string, value: unknown) { | |
const encrypted = CryptoJS.AES.encrypt( |
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
$ gsettings set org.gnome.desktop.wm.keybindings switch-input-source "['<Shift>Alt_L','<Shift>Alt_R']" | |
$ gsettings set org.gnome.desktop.wm.keybindings switch-input-source-backward "['<Alt>Shift_L','<Alt>Shift_R']" |
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
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"name": "Launch Program", | |
"request": "launch", | |
"type": "node", |
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 React, { Component } from 'react' | |
import { BrowserRouter as Router, Route, Link, Match, Redirect, Switch } from 'react-router-dom' | |
import OverviewPage from './page/OverviewPage' | |
import AccountPage from './page/AccountPage' | |
/* | |
Layouts, inline define here for demo purpose | |
you may want to define in another file instead | |
*/ |
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
// Gradient Mixin | |
@mixin gradient($start, $end) { | |
background-color: $start; | |
filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr=#{$start}, endColorstr=#{$end}); | |
background-image: -moz-linear-gradient(center top, $start, $end); | |
background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from($start), to($end)); | |
} | |
// Border Raius Mixin | |
@mixin border-radius($radius) { |