Skip to content

Instantly share code, notes, and snippets.

View mutouyuguo's full-sized avatar
🎯
Focusing

mutouyuguo mutouyuguo

🎯
Focusing
  • China
View GitHub Profile
@mutouyuguo
mutouyuguo / hello.asm
Last active November 20, 2021 14:41
simple hello
global _start
section .data
message: db 'hello, world!', 10
section .text
_start:
mov rax, 1 ;system call number should be stored in rax
mov rdi, 1 ; argument #1 in rdi: where to write (descriptor)?
mov rsi, message ; argument #2 in rsi: where does the string start?
@mutouyuguo
mutouyuguo / data_decl.asm
Last active November 20, 2021 14:39
db directive
section .data
example1: db 5, 16, 8, 4, 2, 11
example2: times 999 db 42
example3: dw 999

To delete all containers including its volumes

docker rm -vf $(docker ps -a -q)

To delete all the images

docker rmi -f $(docker images -a -q)
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
@mutouyuguo
mutouyuguo / mongodb.conf
Created May 31, 2019 14:20
mongo config
dbpath=/codeyuguo/db/data
logpath=/codeyuguo/db/logs/mongodb.log
port=27017
logappend=true
fork=true
replSet=replSet
keyFile=/codeyuguo/db/keyfile
@mutouyuguo
mutouyuguo / hi.conf
Created May 31, 2019 14:20
nginx config
server {
listen 443;
server_name codeyuguo.com www.codeyuguo.com;
location / {
root /codeyuguo/www;
index index.html;
try_files $uri $uri/ =404;
}
ssl on;
ssl_certificate /etc/letsencrypt/live/codeyuguo.com/fullchain.pem;
@mutouyuguo
mutouyuguo / master.conf
Created May 31, 2019 14:19
redis config
masterauth mypwd
requirepass mypwd
protected-mode yes
bind 192.168.5.116
daemonize yes
logfile /codeyuguo/redis/redis.log
appendonly yes
dir /codeyuguo/redis
@mutouyuguo
mutouyuguo / zkEnv.sh
Last active May 31, 2019 14:16
zookeeper configs
#!/usr/bin/env bash
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
@mutouyuguo
mutouyuguo / dev-env.md
Created May 31, 2019 14:12
develop env setup

dev env prepare

install docker

follow the steps

change docker root dir

use soft link

@mutouyuguo
mutouyuguo / elasticsearch.md
Created May 31, 2019 14:11
install elasticsearch

download

cd /codeyuguo/elasticsearch
wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-6.7.1.tar.gz
tar -xzvf elasticsearch-6.7.1.tar.gz
mv elasticsearch-6.7.1 elasticsearch

add new user add give elasticsearch dir power