Tag:empty

  • Empty GitHub repository instead of deleting and re creating

    Time:2021-7-21

    Today, because I wanted to empty the GitHub warehouse and come back, I didn’t know how to solve it later, so I searched for information online and posted a blog by the way — Remove the history from (delete history from) rm -rf .git — recreate the repos from the current content only (recreate repository […]

  • Redis cache server

    Time:2021-7-15

    website: http://www.redis.cn/Advance preparation: virtual machine Introduction to redis Redis is an open source (BSD license), in memory data structure storage system, which can be used as database, cache, message middleware. It supports multiple types of data structures, such as strings, hashes, lists, sets, sorted sets and range queries, bitmaps, hyperlogs and geospatial index radius queries. […]

  • Configuring local Yum image source in Linux

    Time:2021-7-14

    #Manually mount / dev / sr0 device to / media directory, – O ro is read-only mode mount -o ro /dev/sr0 /media #Configure boot auto mount echo “mount -o ro /dev/sr0 /media” >> /etc/rc.local chmod -x /etc/rc.d/rc.local #View the mount point of the file system df -h #View Cd contents ls /media/ #Configure local Yum […]

  • Notes on laravel database migration function

    Time:2021-7-13

    Environmental Science:Laravel 8 Need to useLaravelDatabase migration function, because I am an obsessive-compulsive Virgo, so like to name their own files, such as: However, an error was reported during migration: After several rounds of trying to find outLaravelResearch on migration fileFile name naming formatThere is a fixed parsing, so when I write the file name […]

  • Viewing and clearing the cache of Ubuntu system (qbit)

    Time:2021-7-7

    preface This article is tested in Ubuntu 20.04 View cache fincore See how large a single file is in the cache fincore filename Check the size of all files in the directory in the cache ls ./ | xargs fincore vmtouch See how large a single file is in the cache vmtouch filename Check the […]

  • Basic usage of indexeddb

    Time:2021-6-23

    Effect display <!DOCTYPE html> <html lang=”en”> <head> <meta charset=”UTF-8″> <meta http-equiv=”X-UA-Compatible” content=”IE=edge”> <meta name=”viewport” content=”width=device-width, initial-scale=1.0″> <title>indexedDB</title> </head> <style> fieldset { margin-top: 50px; padding: 30px; } </style> <body> <h3>Adding, deleting, modifying and querying indexeddb Web Database</h3> <div id=”app”> <fieldset> < button onclick = “CTR (‘create ‘)” > Add < / button > <input id=”addInput” type=”text”> […]

  • Three ways to import SQL files into MySQL started by docker

    Time:2021-6-14

    Three ways to import SQL files into MySQL started by docker Preparation of materials First of all, we need to prepare the file to be importedexamples.sql; Import file into docker container docker cp examples.sql mysql:/examples.sql Log in to the container to see if the file is imported successfully docker exec -it mysql bash ls -l […]

  • Implementation of long press event in Vue 2. X mobile terminal

    Time:2021-6-10

    Summary of several methods of long press event implementation in Vue mobile terminal Hello, everyone. I’m your siege lion. I’m Ken, the front-end siege lion of humble love. I want to tell you a serious problem. I’m in a low mood these days and I can’t move the code. As a result, as soon as […]

  • K8s cluster is deleted and node is added

    Time:2021-6-2

    After deleting a node from the established k8s cluster, add a new node. For reference, add a new node. If a new node needs to install docker and k8s basic components.     To build a cluster, you can refer to previous articles:Centos8 builds kubernetes Recommended search of Linux operation and maintenance Communication Community K8s cluster Adding […]

  • Clear the log file being written (qbit)

    Time:2021-5-9

    Test environment of this paper Ubuntu 20.04 MongoDB 4.4 command >Mongod.log # recommendation true >mongod.log echo >mongod.log echo “”>mongod.log truncate -s 0 mongod.log cat /dev/null > mongod.log cp /dev/null mongod.log dd if=/dev/null of=mongod.log These methods can also be used for emptyingtomcatOfcatalina.out This article comes fromqbit snap

  • JS code fragment: utils / lcaalstorage / cookie

    Time:2021-4-30

    Utils utility function /** * Finding all the occurrences of an element in Array * @returns {Array} */ indexOfAll = function (array, element) { var indices = [], idx; idx = array.indexOf(element); while (idx !== -1) { indices.push(idx); idx = array.indexOf(element, idx + 1); } return indices; }; /** * Calculate the length of object […]

  • Implementation of mybatis first level cache and second level cache

    Time:2021-4-27

    This paper introduces the implementation of the system First level cache: It meansSqlSession. The scope of the first level cache is a sqlsession。MybatisThe first level cache is on by default。 In the same sqlsessionExecute the same SQL queryFor the first time, query the database and write it to the cache; The second time it is […]