View rgbaToRgb.ts
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
interface RGBAtoRGBOptions { | |
toColorRGBA: string; | |
backgroundColorRGB?: string; | |
} | |
function rgbaToRgb({ toColorRGBA, backgroundColorRGB = 'rgb(255,255,255)' }: RGBAtoRGBOptions) { | |
const [r, g, b, a] = toColorRGBA | |
.replace(/rgba|\(|\)/g, '') | |
.split(',') | |
.map((str) => parseInt(str, 2)); |
View mysql-backup.sh
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 | |
USER=root | |
PASSWORD=root | |
DATE_NOW="`date '+%Y-%m-%d_%H-%M-%S'`" | |
DIR=/var/local/backup | |
DATABASES=`mysql -u$USER -p$PASSWORD -e "SHOW DATABASES;" | tr -d "| " | grep -v Database` | |
echo "Databases found: $DATABASES" |
View khasky.com-reverse-proxy.conf
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
<IfModule mod_ssl.c> | |
<VirtualHost *:443> | |
# ...config | |
# NodeJS server start | |
ProxyRequests Off | |
ProxyPreserveHost On | |
ProxyVia Full | |
<Proxy *> |
View khasky.com-le-ssl.conf
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
<IfModule mod_ssl.c> | |
<VirtualHost *:443> | |
ServerAdmin hello@khasky.com | |
ServerName khasky.com | |
ServerAlias www.khasky.com | |
DocumentRoot /var/www/khasky.com/public_html | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
CustomLog ${APACHE_LOG_DIR}/access.log combined | |
Include /etc/letsencrypt/options-ssl-apache.conf | |
SSLCertificateFile /etc/letsencrypt/live/khasky.com/fullchain.pem |
View khasky.com.conf
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
<VirtualHost *:80> | |
ServerAdmin hello@khasky.com | |
ServerName khasky.com | |
ServerAlias www.khasky.com | |
DocumentRoot /var/www/khasky.com/public_html | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
CustomLog ${APACHE_LOG_DIR}/access.log combined | |
RewriteEngine on | |
RewriteCond %{SERVER_NAME} =khasky.com [OR] |
View mysql-backup-tar-gz.sh
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 | |
MYSQL_USER=root | |
MYSQL_PASS=root | |
MYSQL_DB=test | |
BACKUP_DIR=/var/local/backup | |
LOGS_DIR=/var/log | |
# Equals to 3 last days |
View build.gradle
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
apply plugin: 'java' | |
def buildVersion = '0.4.0' | |
repositories { | |
mavenCentral() | |
} | |
dependencies { | |
compile 'mysql:mysql-connector-java:5.1.40' |
View ucc_make.cmd
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
rem # Created by poosh (https://github.com/poosh) and edited by Khasky (https://github.com/khasky) | |
rem # PLEASE NOTE: For compile mutator using this batch you should append your package to EditPackages of /System/KillingFloor.ini | |
@echo off | |
color 07 | |
setlocal | |
set MUT=ServerPerksMut | |
set KFDIR=C:\kfdev |
View unrealscript.xml
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
<NotepadPlus> | |
<UserLang name="UnrealScript" ext="uc" udlVersion="2.1"> | |
<Settings> | |
<Global caseIgnored="yes" allowFoldOfComments="no" foldCompact="no" forcePureLC="0" decimalSeparator="0" /> | |
<Prefix Keywords1="no" Keywords2="no" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" /> | |
</Settings> | |
<KeywordLists> | |
<Keywords name="Comments">03/* 03/** 04*/ 00// 01 02</Keywords> | |
<Keywords name="Numbers, prefix1"></Keywords> | |
<Keywords name="Numbers, prefix2"></Keywords> |