自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

lingedeng的专栏

聚沙成塔,集腋成裘

  • 博客(79)
  • 资源 (5)
  • 收藏
  • 关注

原创 本地仓库上传github

注册Github略安装及配置git安装及基本配置......略。如果需要一个本地仓库需要与全局的设置不同的name和email,则可进入本地仓库所在的.git目录执行如下命令:$ git config user.name "xxx"$ git config user.email "your_mail@example.com" 通过`cat config`命令可看到本地仓库的用户名及邮箱地址被设置生成SSH key如果当前系统登录用户目录下不存在.ssh目录,则通过如下命令生成SSH

2022-04-18 16:49:32 811

原创 grub boot.S代码分析

bios_grub_mbr00000000: eb63 9010 8ed0 bc00 b0b8 0000 8ed8 8ec0 .c..............00000010: fbbe 007c bf00 06b9 0002 f3a4 ea21 0600 ...|.........!..00000020: 00be be07 3804 750b 83c6 1081 fefe 0775 ....8.u........u00000030: f3eb 16b4 02b0 01bb 007c b28

2021-10-12 15:09:14 393

原创 linux VHD文件通过NFS启动

服务器端1. 安装ubuntu 18.04 nfs服务器# apt install nfs-kernel-server2. 加载nbd内核模块并使用qemu-nbd加载vhd文件(假设vhd文件包含三个分区),在/dev下生成nbd0p[1-3]三个分区,第三个分区为根分区# modprobe nbd# qemu-nbd -c /dev/nbd0 /path/to/pim_file3. 将/dev/nbd0p3挂载到需要共享的目录(例:/srv/nfs/root)# moun

2021-09-30 17:12:40 706

原创 systemd如何使用/etc/init.d脚本

1. 以apport为例,将/etc/init.d/apport拷贝并生成新的myapport, 内容如下:#! /bin/sh### BEGIN INIT INFO# Provides: myapport# Required-Start: $local_fs $remote_fs# Required-Stop: $local_fs $remote_fs# Default-Start: 2 3 4 5# Default-Stop:# Short-Descript

2021-09-29 17:10:55 2117

原创 Linux systemd单元启动配置及日志之graphical.target

accounts-daemon.service Description=Accounts Service Type=dbus BusName=org.freedesktop.Accounts ExecStart=/usr/lib/accountsservice/accounts-daemon # journalctl -b -u accounts-daemon.service -- Logs begin at Mon 2019-06-03 16:5...

2021-09-29 14:10:21 1262

原创 Linux systemd单元启动配置及日志之multi-user.target

anacron.service can be used to execute commands periodically, with a frequency specified in days. When executed, Anacron reads a list of jobs from a configuration file, normally /etc/anacrontab ExecStart=/usr/sbin/anacron -dsqapport.service...

2021-09-29 14:07:09 3196

原创 Linux systemd单元启动配置及日志之basic.target

systemd-ask-password-plymouth.servicesystemd-ask-password-plymouth.path Forward Password Requests to Plymouth Directory Watch Documentation=http://www.freedesktop.org/wiki/Software/systemd/PasswordAgents # journalctl -b -u systemd-ask-pa...

2021-09-29 13:52:08 1818

原创 Linux systemd单元启动配置及日志之sysinit.target

apparmor.serviceAppArmor is a kernel enhancement to confine programs to a limited set of resources. AppArmor's unique security model is to bind access control attributes to programs rather than to users. ExecStart=/etc/init.d/apparmor start ...

2021-09-29 13:42:49 1432

原创 Linux systemd单元启动配置及日志之local-fs.target

keyboard-setup.service: Set the console keyboard layout ExecStart=/lib/console-setup/keyboard-setup.sh # journalctl -b -u keyboard-setup.service -- Logs begin at Mon 2019-06-03 16:58:43 CST, end at Wed 2021-09-29 13:17:01 CST. --9月 26 09...

2021-09-29 13:29:08 994

原创 Linux systemd启动流程

以Ubuntu 18.04.2 LTS为例,列出Systemd启动target中涉及单元(Unit).default.target (= graphical.target by default)graphical.target Requires=multi-user.target Wants=display-manager.service Conflicts=rescue.service rescue.target After=multi-user.target rescue.ser.

2021-09-14 13:27:31 1198

原创 Linux systemd 基础及命令

From theproject web page:systemdis a suite of basic building blocks for a Linux system. It provides a system and service manager that runs as PID 1 and starts the rest of the system. systemd provides aggressive parallelization capabilities, uses socket..

2021-09-08 10:35:36 829

原创 Gnu-efi头文件

GNU-EFIis a very lightweight developing environment to create UEFI applications. TheEDK2is a large, complex environment with its own build system. GNU-EFI on the other hand is a set of libraries and headers for compiling UEFI applications with a system'...

2021-09-01 15:46:04 626

原创 linux kernel处理提要——字符设备

1. 字符设备dev_t管理关键结构和变量,使用hash表及开链法,hash算法为major % 255static struct char_device_struct { struct char_device_struct *next; unsigned int major; unsigned int baseminor; int minorct; char name[64]; struct cdev *cdev; /* will die */} *chrdevs[CHRDEV_MA

2021-07-30 11:15:41 153

原创 Linux kernel处理提要——模块加载

sys_init_module主要工作,load_module(kernel/module.c):1. 在内核空间建立模块的静态视图(从用户空间拷贝到内核空间)2. 获得段名,符号名称符号表的地址info->secstrings = (void *)info->hdr + info->sechdrs[info->hdr->e_shstrndx].sh_offset;if (info->sechdrs[i].sh_type == SHT_SYMTAB) {

2021-07-30 11:06:12 415

原创 linux ext2文件系统格式解析

1. 使用如下命令创建一个1.45M的img文件并加载格式化$dd if=/dev/zero of=1440.img bs=1k count=1440$modprobe loop$losetup /dev/loop0 1440.img$mke2fs -t ext2 /dev/loop0 或 mke2fs -t ext2 1440.img2. 使用dumpe2fs命令查看超级块和块组信息$ dumpe2fs /dev/loop0dumpe2fs 1.42.9 (4-Feb-2014)

2021-06-25 17:23:43 448

原创 QThread简单测试理解

#ifndef QTHREADTEST_H#define QTHREADTEST_H#include <QObject>#include <QThread>// method 1class Worker : public QObject{ Q_OBJECTpublic: explicit Worker(QObject *parent = 0);signals: void resultReady(const QString& re.

2021-06-24 17:58:58 155

原创 杂项1

1. windows git服务器安装工具准备: Git-2.26.2-64-bit.exe Copssh_4.1.0_Installer.exe1. 新建git系统用户,密码永不过期2. 正常安装Copssh和Git3. 打开Copssh的控制面板,选择User->Add,在弹出的对话框中选择上面建的系统用户,其它保持默认值4. 如果以后不需要免密码登陆的话,则基本环境搭建完成5. 通过git pull/push git@ip:/path/to/foo.git命令访问过程中出现

2021-06-10 10:37:59 512

原创 Linux时区文件基本信息解析

使用"file/usr/share/zoneinfo/PRC"查看时区文件产生的输出信息:/usr/share/zoneinfo/PRC: timezone data, version 2, 3 gmt time flags, 3 std time flags, no leap seconds, 27 transition times, 3 abbreviation chars使用二进制查看工具打开时区文件,对应的关键信息:00000000: 545a 6966 3200 0000 0000.

2021-03-05 10:58:28 1352 1

原创 Busybox initrd及初始化流程

Initrd文件系统加载流程: 1. 引导加载程序,例如 GRUB,定义了要加载的内核,并将这个内核映像以及相关的 initrd 拷贝到内存中。我们可以在 Linux内核源代码目录中的 ./init 子目录中找到很多这种功能。 2. 在内核和 initrd映像被解压并拷贝到内存中之后,内核就会被调用了。它会执行不同的初始化操作,最终会发现自己到了init/main.c:init()...

2019-11-22 09:43:54 634

原创 Linux bash语法提要

$(command)|`command`: 执行相关的命令$[{]variable[}]: 获取变量的值$((计算式)):算术运算,只能进行整型计算,如果有小数时,可以使用bc命令进行辅助单引号('')不具备变量置换功能;双引号("")具备变量置换功能使用绝对或相对路径,以及[bash|sh] script.sh执行时都会使用一个全新的bash环境来执行script脚本而使用[sou...

2019-11-22 09:30:44 142

原创 Ubuntu 18.04 x86_64定制deepin LiveCD x86 ISO

参考:custom-debian-live-environment1. 准备工作安装制作所需的工具sudo apt-get install \ debootstrap \ squashfs-tools \ xorriso \ grub-pc-bin \ grub-efi-amd64-bin \ mtools创建目录mkdir ...

2019-11-12 20:18:23 1680

原创 Mariadb服务器二进制依赖包合成为一个RPM安装包

实验环境: 操作系统:CentOS7 x86_x64 Mariadb:mariadb-server-5.5.64-1.el7.x86_64.rpm及相关依赖包1. 准备Mariadb Server服务器rpm及相关依赖包,如下图2.通过如下命令将所有rpm包进行解压,实验时是根据包的依赖顺序进行解压(应该没有影响) rpm2cpio mariadb-li...

2019-10-12 17:44:20 681

原创 C++简单单元测试类

参考自LEVELDB中的单元测试类头文件(testharness.h):#ifndef TEST_HARNESS_H_#define TEST_HARNESS_H_#include &lt;sstream&gt;namespace simpleut { namespace test { //执行所有的单元测试 extern int RunAllTest(); c...

2019-03-11 15:55:56 1450

原创 Qt下简单WebSocket网络聊天服务器

参考:使用 HTML5 WebSocket 构建实时 Web 应用参考中提供了WebSocket客户端及服务器端代码(C#),这里只是通过QT(4.8.5)/C++进行了重写并使用比较新的Websocket协议,客户端使用参考页面上的前端代码。代码只是为了演示WebSocket的简单交互,所以未进行完善的处理。WebSocketServer.h#ifndef WEBSOCKETSER...

2019-02-18 13:55:11 2847 3

原创 关于C移位操作

在x86_64平台上,下面这段代码输出的结果是否相同?#include &lt;stdint.h&gt;#include &lt;stdio.h&gt;int main(int argc, char* argv[]) { uint32_t k1 = 57; const uint64_t one = 1; uint64_t r0 = one &lt;&lt; k...

2019-01-24 12:27:07 3444

原创 Linux ELF .gnu.hash生成

1. 生成原始动态库的源文件attr.h#include &lt;cstdio&gt;void not_hidden() __attribute__((visibility("default")));void is_hidden() __attribute__((visibility("hidden")));void Log(FILE* f, const char* form...

2019-01-23 17:32:09 2157

原创 ELF重定位分析

1. 变量访问///////////////////////////////////////////////////////////////ml_mainpic_data.c//gcc -fPIC -shared -g -o libmlpicdata.so ml_mainpic_data.cint myglob = 42;int ml_func(int a, int b) { ...

2019-01-21 16:37:08 1241

原创 ELF文件杂记

eu-readelf --helpUsage: eu-readelf [OPTION...] FILE...Print information from ELF file in human-readable form. ELF input selection:      --elf-section[=SECTION]   Use the named SECTION (default .g...

2019-01-21 16:18:10 526

原创 LevelDB之Skiplist

#ifndef SKIPLIST_H_#define SKIPLIST_H_#include &lt;ctime&gt;#include &lt;cstdlib&gt;#include &lt;iostream&gt;#include &lt;fstream&gt;/* 简单跳跃表,它允许简单的插入和删除元素,并提供O(logn)的查询时间复杂度。 *//* SkipL...

2018-08-31 16:36:52 261

翻译 LevelDB之Cache代码

LevelDB license:// Copyright (c) 2011 The LevelDB Authors. All rights reserved.// Use of this source code is governed by a BSD-style license that can be// found in the LICENSE file. See the AUTHOR...

2018-08-31 16:00:10 294

原创 LevelDB之Cache之HandleTable

HandleTalbe::HandleTable()LRUHandle* HandleTalbe::Insert(LRUHandle* h)1. 插入元素情况1:对于原始的HandleTable中没有元素情况2:对于待插入的HandleTable中通过FindPointer找到具有相同的key或hash的节点2. 扩容,重新计算hash并调整节点插入...

2018-08-31 15:39:16 554

转载 MAC地址表、ARP缓存表、路由表及交换机、路由器基本原理

原文引用地址:http://blog.51cto.com/dengqi/1223132MAC地址表    说到MAC地址表,就不得不说一下交换机的工作原理了,因为交换机是根据MAC地址表转发数据帧的。在交换机中有一张记录着局域网主机MAC地址与交换机接口的对应关系的表,交换机就是根据这张表负责将数据帧传输到指定的主机上的。    交换机的工作原理    交换机在接收到数据帧以后,首先、会记录数据帧...

2018-03-01 15:32:40 26881 5

原创 SSH+EXPECT远程执行命令及本地保存结果

#!/usr/bin/expectif {$argc &lt; 4} {    #do something    send_user "usage: $argv0 &lt;remote_host&gt; &lt;remote_port&gt; &lt;remote_user&gt; &lt;remote_pwd&gt;"    exit}set timeout 15 se...

2018-03-01 15:05:46 15052

原创 float之IEEE R32.24

&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt; &lt;script type="text/javascript"&gt; /* float 遵从的是 IEEE R32.24; double 遵从的是 IEEE R64.53; float = 0x41 25 9D B2 0b01000001 00100101 1...

2018-02-08 11:26:56 1807

原创 Qt编码相关

//海军GBK编码 unsigned char str[5] = {0xBA, 0xA3, 0xBE, 0xFC}; QByteArray ba((char *)str, 4); QTextCodec *codec = QTextCodec::codecForName("GBK"); QString string = codec->toUnicode(ba);

2016-12-20 14:04:54 365

原创 4_scala_类相关

//primary constructorclass Person(var firstName: String, var lastName: String) { println("the constructor begins") //some class field private val HOME = System.getProperty("user.home")

2016-04-01 15:54:36 479

原创 3_scala_流程控制

//loop with for and foreach//-Xprint:parse/allval fruits = Array("apple", "banana", "orange")val upperF = for (fruit <- fruits) yield { val s = fruit.toUpperCase //println(s) s}printl

2016-03-29 13:15:12 384

原创 2_scala_数字操作

//string to numberprintln("100".toInt)println("100".toFloat)//raise NumberFormatException//println("foo".toLong)object StringUtil { implicit class StringToInt(s: String) { def toInt(

2016-03-25 10:37:13 743

原创 1_scala_字符串操作

//string compareval s1 = "Hello"val s2 = "h" + "ello"println("'" + s1 + "' equal to " + "'" + s2 + "' is " + (s1 == s2))println(s1.toUpperCase == s2.toUpperCase)println()//multiline stringval

2016-03-24 11:17:50 9793

原创 qrencode生成QRCode及使用ImageMagick和zbar从QRCode读取内容

#include #include #include #include #include #include #include using namespace std;using namespace zbar;//#define QRCODE_TEXT "http://www.ultramundum.org/index.htm"; //

2016-01-18 18:09:30 3167

linux_vi_command.zip

网上下载的linux及vi常用命令整理和简要说明,可以作为参考手册进行查询

2019-09-30

linux-kernel-slides.pdf

网上下载的Linux内核及驱动开发练习,主要包括内核及驱动开发基础知识及练习操作.

2019-09-30

letv_decode

使用Flash Builder 4.x开发的工程文件以及运行使用的Flash Player。乐视解密文件头标识为ABC的swf文件。

2014-07-09

GDataXMLNode

google提供的XML解析生成类集GDataXMLNode(object-c版本)

2011-09-20

GDataXMLNode

google提供的XML数据操作类集GDataXMLNode

2011-09-20

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除