Linux iad1-shared-b7-18 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
Apache
: 67.205.6.31 | : 216.73.216.13
Cant Read [ /etc/named.conf ]
8.2.29
fernandoquevedo
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
share /
zsh /
functions /
Misc /
[ HOME SHELL ]
Name
Size
Permission
Action
add-zle-hook-widget
5.25
KB
-rw-r--r--
add-zsh-hook
1.9
KB
-rw-r--r--
allopt
783
B
-rw-r--r--
checkmail
817
B
-rwxr-xr-x
colors
3.34
KB
-rw-r--r--
getjobs
827
B
-rw-r--r--
harden
96
B
-rwxr-xr-x
is-at-least
2.23
KB
-rw-r--r--
mere
2.02
KB
-rw-r--r--
nslookup
1.11
KB
-rw-r--r--
promptnl
3.23
KB
-rw-r--r--
regexp-replace
1.01
KB
-rw-r--r--
relative
888
B
-rw-r--r--
run-help
3
KB
-rwxr-xr-x
run-help-git
144
B
-rw-r--r--
run-help-ip
862
B
-rwxr-xr-x
run-help-openssl
59
B
-rw-r--r--
run-help-p4
78
B
-rw-r--r--
run-help-sudo
56
B
-rw-r--r--
run-help-svk
52
B
-rw-r--r--
run-help-svn
52
B
-rw-r--r--
sticky-note
4.59
KB
-rwxr-xr-x
tetris
5.31
KB
-rw-r--r--
tetriscurses
10.76
KB
-rw-r--r--
xtermctl
4.09
KB
-rw-r--r--
zargs
8.73
KB
-rw-r--r--
zcalc
11.92
KB
-rwxr-xr-x
zed
4
KB
-rwxr-xr-x
zkbd
7.12
KB
-rwxr-xr-x
zmathfuncdef
2.23
KB
-rw-r--r--
zmv
11.14
KB
-rw-r--r--
zrecompile
6.04
KB
-rw-r--r--
zstyle+
1.24
KB
-rw-r--r--
ztodo
1.37
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : tetris
# Someone once accused zsh of not being as complete as Emacs, because it # lacks Tetris and an adventure game. # # autoload -Uz tetris # zle -N tetris # bindkey '...' tetris emulate -L zsh tetris_hsz=11 tetris_vsz=20 typeset -ga tetris_shapes tetris_shapes=( 0x0f00 0x4444 0x0f00 0x4444 0x4e00 0x4c40 0x0e40 0x4640 0x6600 0x6600 0x6600 0x6600 0x4620 0x6c00 0x4620 0x6c00 0x2640 0x6300 0x2640 0x6300 0x6440 0x8e00 0x44c0 0x0e20 0xc440 0x0e80 0x4460 0x2e00 ) typeset -gA tetris_rotations tetris_rotations=( 0x0f00 0x4444 0x4444 0x0f00 0x4e00 0x4c40 0x4c40 0x0e40 0x0e40 0x4640 0x4640 0x4e00 0x6600 0x6600 0x4620 0x6c00 0x6c00 0x4620 0x2640 0x6300 0x6300 0x2640 0x6440 0x8e00 0x8e00 0x44c0 0x44c0 0x0e20 0x0e20 0x6440 0xc440 0x0e80 0x0e80 0x4460 0x4460 0x2e00 0x2e00 0xc440 ) tetris_blankline= for ((tetris_i=tetris_hsz; tetris_i--; )); do tetris_blankline="$tetris_blankline " done tetris_blankboard= for ((tetris_i=tetris_vsz; tetris_i--; )); do tetris_blankboard="$tetris_blankboard$tetris_blankline" done bindkey -N tetris bindkey -R -M tetris '\000-\377' tetris-timeout for ((tetris_i=256; tetris_i--; )); do bindkey -M tetris 'T\'$(([##8]tetris_i)) tetris-timeout done bindkey -M tetris Ta tetris-left bindkey -M tetris Tj tetris-left bindkey -M tetris Ts tetris-rotate bindkey -M tetris Tk tetris-rotate bindkey -M tetris Td tetris-right bindkey -M tetris Tl tetris-right bindkey -M tetris 'T ' tetris-drop bindkey -M tetris Tq tetris-quit unset tetris_board tetris_score zle -N tetris function tetris { emulate -L zsh if ! zle; then print -u2 "Use M-x tetris RET to play tetris." return 2 fi tetris_saved_state="BUFFER=${BUFFER:q};CURSOR=${CURSOR:q};MARK=${MARK:q};zle -K ${KEYMAP:q}" tetris_speed=$((100.0/KEYTIMEOUT)) zle -K tetris if [[ ${tetris_board+set} == set ]]; then tetris-timeout else tetris_board=$tetris_blankboard tetris_score=0 tetris-new-block fi } function tetris-new-block { emulate -L zsh tetris_block=$tetris_shapes[1+RANDOM%$#tetris_shapes] tetris_block_y=0 tetris_block_x=4 if ! tetris-block-fits; then tetris-place-block "#" tetris-render-screen unset tetris_board tetris_score tetris-quit return fi tetris-place-block "*" tetris-timed-move } zle -N tetris-left function tetris-left { emulate -L zsh tetris-place-block " " (( tetris_block_x-- )) tetris-block-fits || (( tetris_block_x++ )) tetris-place-block "*" tetris-timeout } zle -N tetris-right function tetris-right { emulate -L zsh tetris-place-block " " (( tetris_block_x++ )) tetris-block-fits || (( tetris_block_x-- )) tetris-place-block "*" tetris-timeout } zle -N tetris-rotate function tetris-rotate { emulate -L zsh tetris-place-block " " local save_block=$tetris_block tetris_block=$tetris_rotations[$tetris_block] tetris-block-fits || tetris_block=$save_block tetris-place-block "*" tetris-timeout } zle -N tetris-drop function tetris-drop { emulate -L zsh tetris-place-block " " ((tetris_block_y++)) while tetris-block-fits; do ((tetris_block_y++)) done ((tetris_block_y--)) tetris-block-dropped } zle -N tetris-timeout function tetris-timeout { emulate -L zsh tetris-place-block " " ((tetris_block_y++)) if tetris-block-fits; then tetris-place-block "*" tetris-timed-move return fi ((tetris_block_y--)) tetris-block-dropped } function tetris-block-dropped { emulate -L zsh tetris-place-block "O" local fl=${tetris_blankline// /O} i=$((tetris_block_y*tetris_hsz)) y for ((y=0; y!=4; y++)); do if [[ $tetris_board[i+1,i+tetris_hsz] == $fl ]]; then tetris_board[i+1,i+tetris_hsz]= tetris_board=$tetris_blankline$tetris_board ((tetris_score++)) fi ((i += tetris_hsz)) done tetris-new-block } function tetris-block-fits { emulate -L zsh local y x i=$((1+tetris_block_y*tetris_hsz+tetris_block_x)) b=0x8000 for ((y=0; y!=4; y++)); do for ((x=0; x!=4; x++)); do if ((tetris_block&b)); then ((x+tetris_block_x >= 0)) || return 1 ((x+tetris_block_x < tetris_hsz)) || return 1 ((y+tetris_block_y >= 0)) || return 1 ((y+tetris_block_y < tetris_vsz)) || return 1 [[ $tetris_board[i] == " " ]] || return 1 fi ((b >>= 1)) ((i++)) done ((i+=tetris_hsz-4)) done return 0 } function tetris-place-block { emulate -L zsh local y x i=$((1+tetris_block_y*tetris_hsz+tetris_block_x)) b=0x8000 for ((y=0; y!=4; y++)); do for ((x=0; x!=4; x++)); do ((tetris_block&b)) && tetris_board[i]=$1 ((b >>= 1)) ((i++)) done ((i+=tetris_hsz-4)) done } function tetris-timed-move { emulate -L zsh tetris-render-screen LBUFFER= RBUFFER=$'\n'$tetris_screen zle -R zle -U T } function tetris-render-screen { emulate -L zsh setopt extendedglob local s i extras extras=( "Score: $tetris_score" "" "Game parameters: ${tetris_hsz}x$tetris_vsz, ${tetris_speed}Hz" "" "Keys: left: a j" " rotate: s k" " right: d l" " drop: space" " quit: q" ) for ((i=0; i!=tetris_vsz; i++)); do s="$s|${${${${${tetris_board[1+i*tetris_hsz,(i+1)*tetris_hsz]}//O/()}//\*/**}// / }//\#/##}|"${extras[1]+ $extras[1]}$'\n' extras[1]=() done s="$s+${tetris_blankline// /--}+" tetris_screen=$s } zle -N tetris-quit function tetris-quit { emulate -L zsh if [[ ! -o always_last_prompt ]]; then BUFFER= zle -M $tetris_screen fi eval $tetris_saved_state if [[ -o always_last_prompt ]]; then zle -M $tetris_screen fi } tetris "$@"
Close