Posted by chris on: 2020-12-24, Category: MacOS
Our mega cheat sheet of Mac terminal commands provides a great reference for all the important commands you should know.
Search | |
---|---|
grep “ |
Output all occurrences of |
grep -rl “ |
Search for all files containing |
Output | |
cat |
Output the content of |
less |
Output the contents of |
head |
Output the first 10 lines of |
Appends the output of |
|
Direct the output of |
|
Direct the output of |
Posted by chris on: 2020-12-24, Category: CentOS
In a world bursting with new tools and diverse development environments, it’s practically a necessity for any developer or engineer to learn some basic sysadmin commands. Specific commands and packages can help developers organize, troubleshoot, and optimize their applications and—when things go wrong—provide valuable triage information to operators and sysadmins.
Whether you are a new developer or want to manage your own application, the following 20 basic sysadmin commands can help you better understand your applications. They can also help you describe problems to sysadmins troubleshooting why an application might work locally but not on a remote host. These commands apply to Linux development environments, containers, virtual machines (VMs), and bare metal.
Posted by chris on: 2020-12-22, Category: Search Engine
Sphinx (SQL Phrase Index) is a standalone full-text search engine that provides efficient search functionality to third party applications, especially SQL databases. This search engine was developed in 2001 by a Russian developer named Andrew Aksyonoff to guarantee a (1) good search quality, (2) performed at high speed (3) with a low resource consumption (Disk IO, CPU). It can be integrated with scripting languages such as Python and Java.
The Sphinx search engine has its own data source drivers that are used to interact with different database management systems. We must specify the driver we need in the configuration files.
Posted by chris on: 2019-08-12, Category: Algorithm
Bubble Sort is the simplest sorting algorithm that works by repeatedly swapping the adjacent elements if they are in wrong order.
Example: First Pass:
- ( 5 1 4 2 8 ) –> ( 1 5 4 2 8 ), Here, algorithm compares the first two elements, and swaps since 5 > 1.
- ( 1 5 4 2 8 ) –> ( 1 4 5 2 8 ), Swap since 5 > 4
- ( 1 4 5 2 8 ) –> ( 1 4 2 5 8 ), Swap since 5 > 2
- ( 1 4 2 5 8 ) –> ( 1 4 2 5 8 ), Now, since these elements are already in order (8 > 5), algorithm does not swap them.
Posted by chris on: 2019-08-07, Category: Algorithm
Counting sort is a sorting technique based on keys between a specific range. It works by counting the number of objects having distinct key values (kind of hashing). Then doing some arithmetic to calculate the position of each object in the output sequence.
Let us understand it with the help of an example.
For simplicity, consider the data in the range 0 to 9.
Input data: 1, 4, 1, 2, 7, 5, 2
1) Take a count array to store the count of each unique object.
Index: 0 1 2 3 4 5 6 7 8 9
Count: 0 2 2 0 1 1 0 1 0 0
Posted by chris on: 2019-05-21, Category: Objective C
The Objective-C Runtime is one of the overlooked features of Objective-C initially when people are generally introduced to Cocoa/Objective-C. The reason for this is that while Objective-C (the language) is easy to pick up in only a couple hours, newcomers to Cocoa spend most of their time wrapping their heads around the Cocoa Framework and adjusting to how it works. However the runtime is something that everybody should at least know how it works in some detail beyond knowing that code like [target doMethodWith:var1];
gets translated into objc_msgSend(target,@selector(doMethodWith:),var1);
by the compiler. Knowing what the Objective-C runtime is doing will help you gain a much deeper understanding of Objective-C itself and how your app is run. I think Mac/iPhone Developers will gain something from this, regardless of your level of experience.
Posted by chris on: 2019-05-20, Category: Flutter
Creating mobile applications have always been a fundamental pillar of the tech industry but having multiple platforms for which different apps need to be developed has been an issue for some time. Apart from having to maintain two teams, one for Android and one for iOS, there’s always a gap between the applications developed as they are made by totally different teams. That’s what gave birth to the idea of creating cross-platform mobile applications.
There are many types and solutions but the most popular one right now is by creating compiled apps that give the closest performance to that of the real native applications. The most powerful contenders in that field at this moment are Google’s Flutter and Facebook’s React Native. Let’s have look strengths and weaknesses of both Flutter and React Native and do an objective React Native vs Flutter comparison.
Posted by chris on: 2019-05-15, Category: SSL
SSL Certificates are small data files that digitally bind a cryptographic key to an organization’s details. When installed on a web server, it activates the padlock and the https protocol and allows secure connections from a web server to a browser. Typically, SSL is used to secure credit card transactions, data transfer and logins, and more recently is becoming the norm when securing browsing of social media sites.
Obtain SSL certificates from the letsencrypt.org ACME server. Suitable for automating the process on remote servers.
Posted by chris on: 2019-05-13, Category: CocoaPods
CocoaPods is the most popular dependency manager for Swift and Objective-C Cocoa projects, but chances are, you already knew that if you’re here, wanting to publish your own CocoaPod to be used by others in their own projects.
Cocoaods在iOS开发者中使用非常广泛,类似maven,是用来管理三方库的一个工具,项目用Cocoapods来管理省去了很多事,Cocoapods不仅可以用来管理三方库,也可以自己搭建一个仓库给自己的项目使用,可以是私有库也可以是公有库,可以原码依赖,也可以是二进制文件依赖,原码依赖常见的都是Open Source Library,Github上的很多开源库,比如AFNetworking等,如果提供商业的SDK一般不会用原码,基本都是二进制库(Binary),今天就来说说如何用Cocoapods发布一个Binary iOS Framework.
CocoaPods is the most popular dependency manager for Swift and Objective-C Cocoa projects, but chances are, you already knew that if you’re here, wanting to publish your own CocoaPod to be used by others in their own projects.
Cocoaods在iOS开发者中使用非常广泛,类似maven,是用来管理三方库的一个工具,项目用Cocoapods来管理省去了很多事,Cocoapods不仅可以用来管理三方库,也可以自己搭建一个仓库给自己的项目使用,可以是私有库也可以是公有库,可以原码依赖,也可以是二进制文件依赖,原码依赖常见的都是Open Source Library,Github上的很多开源库,比如AFNetworking等,如果提供商业的SDK一般不会用原码,基本都是二进制库(Binary),今天就来说说如何用Cocoapods发布一个Binary iOS Framework.
Posted by chris on: 2019-05-09, Category: Yii
When a Yii application starts processing a requested URL, the first step it takes is to parse the URL into a route. The route is then used to instantiate the corresponding controller action to handle the request. This whole process is called routing.
The reverse process of routing is called URL creation, which creates a URL from a given route and the associated query parameters. When the created URL is later requested, the routing process can resolve it back into the original route and query parameters.
When a Yii application starts processing a requested URL, the first step it takes is to parse the URL into a route. The route is then used to instantiate the corresponding controller action to handle the request. This whole process is called routing.
The reverse process of routing is called URL creation, which creates a URL from a given route and the associated query parameters. When the created URL is later requested, the routing process can resolve it back into the original route and query parameters.