Consider a list of strings you need to permanently assign a random color.
First you should turn the string into a hash.
var string = "string"
var hash = 0
# Put this file in /etc/nginx/sites-available | |
# Then "ln -s /etc/nginx/sites-available/aria2-nginx.conf /etc/nginx/sites-enabled" | |
# Then "sudo service nginx restart" | |
server { | |
listen 80; | |
listen [::]:80; | |
root /var/www/aria2; # Put your aria2 web ui here, such as AriaNg | |
index index.html; | |
server_name DOMAIN_NAME; | |
location / { |
Note: $
denotes the start of a command. Don't actually type this.
Edit: This article is also on my blog: https://www.emilykauffman.com/teaching/install-anaconda-on-wsl
x86_65.sh
. If I had a 32-bit computer, I'd select the x86.sh
version. If you accidentally try to install the wrong one, you'll get a warning in the terminal. I chose Anaconda3-5.2.0-Linux-x86_64.sh
.wget https://repo.continuum.io/archive/[YOUR VERSION]
. Example: $ wget https://repo.continuum.io/archive/Anaconda3-5.2.0-Linux-x86_64.sh
#!/usr/bin/env bash | |
# Set hostname | |
hostnamectl set-hostname master # for master node | |
# ================================================================ | |
# Install Docker | |
# ================================================================ | |
# CentOS/RHEL |
Khi nhắc đến việc làm sao để tạo ra 1 ứng dụng mobile thì thứ mọi người sẽ lặp tức nghĩ ngay đến là native app (Android và iOS), nhưng bên cạnh đó vẫn còn rất nhiều công nghệ có thể giúp bạn tạo ra 1 ứng dụng mobile như Cordova, Webview (WeChat), Ionic, Xamarin và React Native. Tất cả các framework, platform đó đều hổ trợ người dùng tạo ra được 1 ứng dụng mobile theo ý muốn của mình. Và để không bỏ lỡ cuộc vui thì Google cũng đã mang đến cho người dùng đứa con mới nhất của mình - Flutter - nó kế thừa cũng như nổi bật hơn các công nghệ hybrid app kia. Vậy thì làm sao để có thể sử dụng, có thể tạo ra được những sản phẩm theo ý muốn của mình? Bài viết với những kiến thức của bản thân mình sẽ đem đến cho bạn có được 1 số kiến thức cơ bản nhất để có thể tự mình "chiến" và "khám phá" Flutter.
Bao giờ cũng vậy, bạn muốn "chiến" hoặc "chỉ học để biết" 1 library, 1 framework, 1 platform thì ngôn ngữ (language) sử dụng để build
#!/bin/bash | |
### Install PHP 7.4 on OPenSUSE 42.2 64Bits | |
### https://build.opensuse.org/package/view_file/devel:languages:php/php7/php7.spec?expand=1 | |
### https://www.howtoforge.com/tutorial/how-to-install-php-7-on-debian/ | |
### http://www.shaunfreeman.name/compiling-php-7-on-centos/ | |
zypper in openssl-devel | |
zypper in gcc gcc-c++ libxml2-devel pkgconfig libbz2-devel curl-devel libwebp-devel |
#!/bin/bash | |
FEED_HOME="https://community.greenbone.net/t/about-greenbone-community-feed-gcf/1224" | |
FEED_VENDOR="Greenbone Networks GmbH" | |
write_feed_xml () { | |
FEED_VERSION=`cat $FEED_DIR/timestamp` | |
mkdir -p $FEED_DIR |
$task = Get-ScheduledTask | Where-Object ` | |
{ ` | |
$_.TaskPath -eq "\Microsoft\Windows\UpdateOrchestrator\" -and ` | |
$_.TaskName -eq "Reboot" ` | |
} | |
$task_file = "C:\Windows\System32\Tasks\Microsoft\Windows\UpdateOrchestrator\Reboot" | |
if( $task -eq $null ) | |
{ |
#!/usr/bin/env bash | |
# Note: LOGIN SCREEN SCALE (200%), LOGIN SCREEN SIZE (1152x864) and DISPLAY SCALE (200%) below are dependant on | |
# Virtual Machine > Settings > Display > 'Use full resolution for Retina display' in VMware Fusion being checked | |
# (gui.fitGuestUsingNativeDisplayResolution = "TRUE" in .vmx file) | |
# Get the installed Ubuntu version e.g. 20, 18, 16 etc. | |
VERSION=$(lsb_release -r | awk '{print $2}' | cut -d '.' -f 1) |
# GNOME 3.6.2 | |
# stole fair and square from https://gist.github.com/musinsky/2402448#file-gnome-sh | |
gsettings set org.gnome.desktop.default-applications.terminal exec 'gnome-terminal --geometry=96x24+0-0' | |
gsettings set org.gnome.desktop.default-applications.terminal exec-arg '-x' | |
gsettings set org.gnome.desktop.background picture-options 'none' | |
gsettings set org.gnome.desktop.background color-shading-type 'vertical' | |
gsettings set org.gnome.desktop.background primary-color '#3C78B4' # (Red: 60 Green: 120 Blue: 180) | |
gsettings set org.gnome.desktop.background secondary-color '#1E3C5A' # (Red: 30 Green: 60 Blue: 90) |