Configurando Syntax highlighter

Configurações de Interfaces ( Kubuntu, Cinnamon, LXDE, Ubuntu Desktop, KDE ), Remoto: XRDP e VNC.
Rede: interfaces de acesso, SSH, FTP, SAMBA, VPN
Instalação do Apache/Nginx, Mysql, Mariadb, Postgress.
admin
Site Admin
Mensagens: 9
Registrado em: 10 Jun 2023 23:31

Configurando Syntax highlighter

Mensagem por admin »

Programação, nao sei do que
aryon
Mensagens: 4
Registrado em: 11 Jun 2023 15:57

Testando Syntax highlighter

Mensagem por aryon »

Código: Selecionar todos

$id = 0;
if (isset($_REQUEST['id']))
	$id = (int)$_REQUEST['id'];
else if (isset($_REQUEST['search_name'])) {
	if (strlen($_REQUEST['search_name']) < 3 && !Validator::number($_REQUEST['search_name'])) {
		echo 'Player name is too short.';
	} else {
		if (Validator::number($_REQUEST['search_name']))
			$id = $_REQUEST['search_name'];
		else {
			$query = $db->query('SELECT `id` FROM `accounts` WHERE `name` = ' . $db->quote($_REQUEST['search_name']));
			if ($query->rowCount() == 1) {
				$query = $query->fetch();
				$id = $query['id'];
			} else {
				$query = $db->query('SELECT `id`, `name` FROM `accounts` WHERE `name` LIKE ' . $db->quote('%' . $_REQUEST['search_name'] . '%'));
				if ($query->rowCount() > 0 && $query->rowCount() <= 10) {
					echo 'Do you mean?<ul>';
					foreach ($query as $row)
						echo '<li><a href="' . $base . '&id=' . $row['id'] . '">' . $row['name'] . '</a></li>';
					echo '</ul>';
				} else if ($query->rowCount() > 10)
					echo 'Specified name resulted with too many accounts.';
			}
		}
	}
}
Editado pela última vez por aryon em 18 Set 2023 23:01, em um total de 2 vezes.
admin
Site Admin
Mensagens: 9
Registrado em: 10 Jun 2023 23:31

Testando o Shell do Linux na Syntax highlighter

Mensagem por admin »

Código: Selecionar todos

root@linux:/etc/init.d# ifconfig
ens18: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.3.100  netmask 255.255.255.0  broadcast 192.168.3.255
        inet6 2002:2dba:f0f9:10:f3fa:53e1:74c3:5622  prefixlen 64  scopeid 0x0<global>
        inet6 2002:2dba:f0f9:10:694a:4c87:cb47:f9d8  prefixlen 64  scopeid 0x0<global>
        inet6 2002:2dba:f0f9:10:1fe4:be4a:817d:28fb  prefixlen 64  scopeid 0x0<global>
        inet6 fe80::9912:a142:dd67:5af3  prefixlen 64  scopeid 0x20<link>
        ether 62:b7:c8:14:26:bc  txqueuelen 1000  (Ethernet)
        RX packets 334196  bytes 109616415 (109.6 MB)
        RX errors 0  dropped 14  overruns 0  frame 0
        TX packets 162379  bytes 94091339 (94.0 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ens19: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.13.100  netmask 255.255.255.0  broadcast 192.168.13.255
        inet6 fe80::c54a:58c7:7d6d:6e5c  prefixlen 64  scopeid 0x20<link>
        ether 9e:90:34:59:58:2e  txqueuelen 1000  (Ethernet)
        RX packets 1967  bytes 220098 (220.0 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1465  bytes 148816 (148.8 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 4968

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Loopback Local)
        RX packets 15552  bytes 5152992 (5.1 MB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 15552  bytes 5152992 (5.1 MB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

root@linux:/etc/init.d#
admin
Site Admin
Mensagens: 9
Registrado em: 10 Jun 2023 23:31

Testando no Linux o comando ls -l na Syntax highlighter

Mensagem por admin »

Código: Selecionar todos

root@linux:/etc/init.d# jogos
total 48
drwxrwxr-x  5 steam steam 4096 set  4 23:58 bfv
drwxrwxr-x  3 steam steam 4096 set  7 00:35 compilando
drwxrwxr-x  6 steam steam 4096 ago 31 23:30 csgo
drwxrwxr-x 12 steam steam 4096 set  8 23:10 hlds
drwxrwxr-x  7 steam steam 4096 set  4 21:40 kf2ds
drwxrwxr-x 13 steam steam 4096 set 29  2022 kfds
drwxrwxr-x  9 steam steam 4096 set  3 22:38 ns2ds
drwxrwxr-x  8 steam steam 4096 set 17 18:26 otserv
drwxrwxr-x  7 steam steam 4096 jul 31  2022 quake3
drwxrwxr-x  8 steam steam 4096 set  2 14:48 srcds
drwxrwxr-x  7 steam steam 4096 set  3 17:00 tf2ds
drwxrwxr-x 14 steam steam 4096 ago  3 21:56 tibia
root@linux:/home/steam/jogos#
admin
Site Admin
Mensagens: 9
Registrado em: 10 Jun 2023 23:31

Testando no Linux o mc editor na Syntax highlighter

Mensagem por admin »

Código: Selecionar todos

  Esquerdo     Arquivo     Comando     Opções     Direito
┌<─ /home/steam/jogos/hlds ────────────────────────────────────────────────────.[^]>┐┌<─ /home/steam/jogos/otserv ──────────────────────────────────────────────────.[^]>┐
│.n                           Nome                             │Tamanho│Hora de modi││.n                           Nome                             │Tamanho│Hora de modi│
│/..                                                           │UP--DIR│set  7 23:04││/..                                                           │UP--DIR│set  7 23:04│
│/cstrike                                                      │   4096│dez 29  2022││/Linux                                                        │   4096│set 29  2022│
│/dmc                                                          │   4096│jul 14  2022││/build                                                        │   4096│jun 17 14:18│
│/dod                                                          │   4096│jul 19  2022││/cmake                                                        │   4096│out 20  2020│
│/linux64                                                      │   4096│jul 30 20:37││/data                                                         │   4096│out 20  2020│
│/ns                                                           │   4096│set  7 23:28││/src                                                          │   4096│jun 17 14:52│
│/ns 3.2.1                                                     │   4096│jul 16  2022││/vc14                                                         │   4096│out 20  2020│
│/rcbot                                                        │   4096│jul 20  2022││ CMakeLists.txt                                               │   1623│abr 21  2020│
│/steamapps                                                    │   4096│jul 30 20:37││ STAR.bat                                                     │    422│out  4  2020│
│/tfc                                                          │   4096│jul 14  2022││ boost_filesystem-vc142-mt-x64-1_73.dll                       │ 112128│set 24  2020│
│/valve                                                        │   4096│jul 14  2022││ boost_iostreams-vc142-mt-x64-1_73.dll                        │  78848│set 24  2020│
│ banned.cfg                                                   │      0│mar 11  2010││ bz2.dll                                                      │  75264│set 24  2020│
│*core.so                                                      │ 960749│jul 14  2022││ config.lua                                                   │   3102│jun 17 14:42│
│*crashhandler.so                                              │ 658817│jul 14  2022││ key.pem                                                      │    885│abr 21  2020│
│ custom.hpk                                                   │1245736│ago  7  2012││ libmariadb.dll                                               │ 303616│set 24  2020│
│ debug.cmds                                                   │     45│set  7 19:34││ lua51.dll                                                    │ 707584│set 24  2020│
│ debug.log                                                    │   4807│set  7 19:34││ lzma.dll                                                     │ 152576│set 24  2020│
│*demoplayer.so                                                │ 306167│jul 14  2022││*ot-server                                                    │   1906│jun 20 23:33│
│*engine_i486.so                                               │2995362│jul 14  2022││ pugixml.dll                                                  │ 209920│set 24  2020│
│*filesystem_stdio.so                                          │ 395639│jul 14  2022││ schema.sql                                                   │  14068│out 20  2020│
│*hl-server                                                    │   3240│ago 15  2022││*screen_run                                                   │    132│set  3  2022│
│*hlds_amd                                                     │ 173402│mar  4  2010││ screen_run.pid                                               │      4│set 17 18:26│
│*hlds_linux                                                   │ 107274│jul 14  2022││*star.sh                                                      │     38│set  3  2022│
│*hlds_run                                                     │   7778│jul 14  2022││*tfs                                                          │9995352│jun 17 14:18│
│*hltv                                                         │ 173713│jul 14  2022││ theforgottenserver-x64.exe                                   │2308096│out 20  2020│
│!libSDL2.so                                                   │     16│jul 14  2022││ zlib1.dll                                                    │  85504│set 24  2020│
│*libgcc_s.so.1.be                                             │ 322152│jul 14  2022││ zstd.dll                                                     │ 535040│set 24  2020│
│*libstdc++.so.6.old                                           │3769939│jul 14  2022││                                                              │       │            │
│*libsteam.so                                                  │4383138│jul 14  2022││                                                              │       │            │
│*libsteam_api.so                                              │  76032│jul 14  2022││                                                              │       │            │
│*libtier0.so                                                  │ 474299│jul 14  2022││                                                              │       │            │
│*libvstdlib.so                                                │ 441221│jul 14  2022││                                                              │       │            │
│ listip.cfg                                                   │      0│mar 11  2010││                                                              │       │            │
│*proxy.so                                                     │ 951038│jul 14  2022││                                                              │       │            │
│*screen_run                                                   │    184│set  6 23:42││                                                              │       │            │
│ steam_appid.txt                                              │      3│set  8 23:12││                                                              │       │            │
│*steamclient.so                                               │ 36173K│jul 30 20:37││                                                              │       │            │
│*vgui.so                                                      │ 976013│jul 14  2022││                                                              │       │            │
│*vgui2.so                                                     │ 900553│jul 14  2022││                                                              │       │            │
│*voice_miles.so                                               │  54955│jul 14  2022││                                                              │       │            │
│*voice_silk.so                                                │ 664256│jul 14  2022││                                                              │       │            │
│*voice_speex.so                                               │ 135312│jul 14  2022││                                                              │       │            │
│                                                              │       │            ││                                                              │       │            │
│                                                              │       │            ││                                                              │       │            │
├───────────────────────────────────────────────────────────────────────────────────┤├───────────────────────────────────────────────────────────────────────────────────┤
│UP--DIR                                                                            ││UP--DIR                                                                            │
└───────────────────────────────────────────────────────────────── 110G/439G (25%) ─┘└───────────────────────────────────────────────────────────────── 110G/439G (25%) ─┘
Hint: Leap to frequently used directories in a single bound with C-\.
root@linux:/home/steam/jogos/otserv#                                                                                                                                   [^]
 1Ajuda           2Menu            3Ver             4Editar          5Copiar          6RenMov          7Mkdir           8Deletar         9PuxarM         10Sair
 
admin
Site Admin
Mensagens: 9
Registrado em: 10 Jun 2023 23:31

Testando no Linux programação em Shell na Syntax highlighter

Mensagem por admin »

Código: Selecionar todos

#! /bin/sh
### BEGIN INIT INFO
# Provides:          csgo
# Required-Start:    $network
# Should-Start:      $network
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: SERVIDOR DE CSGO
# Description:       CSGO ATMSAT I
#                    conexao em csgo.atmsat.com.br ou csgo.atmsat.com
### END INIT INFO

# Author: Aryon Thyago Moraski <aryon.moraski@gmail.com>

PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
NAME=screen_run
USER=steam
DIRNAME=/home/steam/jogos/csgo
DAEMON=$NAME
DAEMON_ARGS=""
PIDFILE=$DIRNAME/$NAME.pid
DESC="CSGO - ATMSAT I"
SCRIPTNAME=/etc/init.d/csgo-server

# Exit if the package is not installed
test -x $DIRNAME/$DAEMON || exit 0

. /lib/lsb/init-functions

pid_csgo() {
    PID_CSGO=`ps -ef | grep SCREEN | grep CSGO | grep $USER | awk '{print $2}'`
}
case "$1" in
  start)
        log_daemon_msg "Iniciando $DESC"
        start-stop-daemon --start --quiet --background --make-pidfile --pidfile $PIDFILE --chuid $USER --chdir $DIRNAME \
            --exec $DAEMON -- $DAEMON_ARGS
        status=$?
        log_end_msg $status
        ;;
  stop)
        log_daemon_msg "Parando $DESC"
        start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME
        pid_csgo
        if [ $PID_CSGO ]; then
            su -c "kill -9 $PID_CSGO" root
        fi
        rm -f $PIDFILE
        status=$?
        log_end_msg $status
        ;;
  reload|force-reload)
       log_daemon_msg "Recarregando $DESC"
       start-stop-daemon --stop --quiet --pidfile $PIDFILE --name $NAME --signal 1
       sleep 2
       $0 start
       status=$?
       ;;
  restart)
        log_daemon_msg "Reiniciando $DESC"
        $0 stop
        sleep 5
        $0 start
        ;;
  status)
        status_of_proc -p "$PIDFILE" && exit 0 || exit $?
        ;;
  *)
        echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload|status}" >&2
        exit 3
        ;;
esac

exit 0
admin
Site Admin
Mensagens: 9
Registrado em: 10 Jun 2023 23:31

Re: Configurando Syntax highlighter

Mensagem por admin »

Código: Selecionar todos


$id = 0;
if (isset($_REQUEST['id']))
$id = (int)$_REQUEST['id'];
else if (isset($_REQUEST['search_name'])) {
if (strlen($_REQUEST['search_name']) < 3 && !Validator::number($_REQUEST['search_name'])) {
echo 'Player name is too short.';
} else {
if (Validator::number($_REQUEST['search_name']))
$id = $_REQUEST['search_name'];
else {
$query = $db->query('SELECT `id` FROM `accounts` WHERE `name` = ' . $db->quote($_REQUEST['search_name']));
if ($query->rowCount() == 1) {
$query = $query->fetch();
$id = $query['id'];
} else {
$query = $db->query('SELECT `id`, `name` FROM `accounts` WHERE `name` LIKE ' . $db->quote('%' . $_REQUEST['search_name'] . '%'));
if ($query->rowCount() > 0 && $query->rowCount() <= 10) {
echo 'Do you mean?<ul>';
foreach ($query as $row)
echo '<li><a href="' . $base . '&id=' . $row['id'] . '">' . $row['name'] . '</a></li>';
echo '</ul>';
} else if ($query->rowCount() > 10)
echo 'Specified name resulted with too many accounts.';
}
}
}
}

Responder