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
.386 | |
.model small, c | |
;---------------------------------------------------------------- | |
; Stak segment | |
stack_seg SEGMENT stack | |
DB 100 DUP(?) |
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
.model small | |
.data | |
Filename db 'file.txt',00h | |
FHndl dw ? | |
Buffer db 80h dup(?) | |
.stack 100h | |
.code | |
Program: | |
mov ax, @data | |
mov ds, ax |
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 | |
# Support ubuntu 20.04 lts | |
# Install docker | |
apt-get update | |
apt-get install -y \ | |
ca-certificates \ | |
curl \ | |
gnupg \ | |
lsb-release |
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 apt install gnome-shell-extensions | |
gnome-tweaks | |
sudo apt install chrome-gnome-shell |
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
Hash Functions | |
A comprehensive collection of hash functions, a hash visualiser and some test results [see Mckenzie et al. Selecting a Hashing Algorithm, SP&E 20(2):209-224, Feb 1990] will be available someday. If you just want to have a good hash function, and cannot wait, djb2 is one of the best string hash functions i know. it has excellent distribution and speed on many different sets of keys and table sizes. you are not likely to do better with one of the "well known" functions such as PJW, K&R[1], etc. Also see tpop pp. 126 for graphing hash functions. | |
djb2 | |
this algorithm (k=33) was first reported by dan bernstein many years ago in comp.lang.c. another version of this algorithm (now favored by bernstein) uses xor: hash(i) = hash(i - 1) * 33 ^ str[i]; the magic of number 33 (why it works better than many other constants, prime or not) has never been adequately explained. | |
unsigned long | |
hash(unsigned char *str) | |
{ | |
unsigned long hash = 5381; | |
int c; |
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
# Add repository PHP to ubuntu 20.04 | |
sudo apt install software-properties-common | |
sudo add-apt-repository ppa:ondrej/php | |
# Install PHP 8.1 to run Wordpress, Magento 2 | |
sudo apt install php8.1-common php8.1-cli php8.1-fpm php8.1-opcache php8.1-gd php8.1-mysql php8.1-curl php8.1-intl php8.1-xsl php8.1-mbstring php8.1-zip php8.1-bcmath php8.1-soap |
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
version: '3.7' | |
services: | |
erlang: | |
image: dylanops/erlang:22 | |
container_name: erlang | |
volumes: | |
-./project/path:/home/erlang/app | |
- ~/.cache/rebar3:/home/erlang/.cache/rebar3 | |
ports: |
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 yum install gcc | |
sudo yum install libxslt-devel | |
sudo yum install openssl-devel | |
sudo yum install sqlite-devel | |
sudo yum install curl-devel | |
sudo yum install oniguruma-devel | |
sudo yum install gd gd-devel php-gd | |
sudo yum install pcre-devel zlib zlib-devel libzip-devel make |
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
# Install terraform on ubuntu | |
curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add - | |
sudo apt install terraform | |
# install with specify version | |
sudo apt install terraform=0.14.0 | |
terraform version |
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
# Please change path to your project | |
set $MAGE_ROOT /Applications/MAMP/htdocs/m235cc/pub/; | |
index index.php; | |
autoindex off; | |
charset UTF-8; | |
error_page 404 403 = /errors/404.php; | |
#add_header "X-UA-Compatible" "IE=Edge"; | |
NewerOlder