This file contains hidden or 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
Test if you are root, and if not, restart with sudo, for example: | |
#! /bin/bash | |
if [[ $EUID -ne 0 ]]; | |
then | |
exec sudo /bin/bash "$0" "$@" | |
fi |
This file contains hidden or 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
git reset --soft HEAD~8 && git commit |
This file contains hidden or 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
https://stackoverflow.com/questions/30100222/mac-terminal-error-2002-hy000-cant-connect-to-local-mysql-server-through-soc | |
mysqld stop | |
mysql.server start |
This file contains hidden or 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
https://stackoverflow.com/questions/17757248/error-there-is-no-script-engine-for-file-extension-vbs-when-using-git-bash |
This file contains hidden or 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
What are MAC addresses used for? | |
MAC addresses are the low level basics that make your ethernet based network work. | |
Network cards each have a unique MAC address. Packets that are sent on the ethernet are always coming from a MAC address and sent to a MAC address. If a network adapter is receiving a packet, it is comparing the packet’s destination MAC address to the adapter’s own MAC address. If the addresses match, the packet is processed, otherwise it is discarded. | |
There are special MAC addresses, one for example is ff:ff:ff:ff:ff:ff, which is the broadcast address and addresses every network adapter in the network. | |
How do IP addresses and MAC addresses work together? |
This file contains hidden or 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
find . -type f | xargs grep -n access_logger |
This file contains hidden or 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
/usr/bin/xcodebuild -version |
This file contains hidden or 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
While majority of the end-users doesn’t care how Internet works, some of you might be curious to understand the basics of how Internet works. | |
In this article we will try to peel off the first layer on this topic to understand how Internet works by elaborating the journey of a data packet from its source to destination on the Internet. From this perspective, we’ll try to keep the content of this article fairly basic. | |
Before going further, lets first quickly and briefly understand the concepts of DHCP and DNS. | |
DHCP | |
Have you ever thought how your computer gets an IP address? Well, it is important to know that there are two ways through which a computer gets an IP address. One is static while the other is dynamic. | |
Static method is the one in which the computer administrator manually sets the IP address to the machine. If your machine is connected to a network like LAN then one thing is to be kept in mind that the IP address being set should not be the same as the IP address of any other machine on the same ne |
This file contains hidden or 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
Link: https://www.lifewire.com/virtual-local-area-network-817357 | |
A virtual LAN (Local Area Network) is a logical subnetwork that can group together a collection of devices from different physical LANs. Larger business computer networks often set up VLANs to re-partition their network for improved traffic management. | |
Several different kinds of physical networks support virtual LANs including both Ethernet and Wi-Fi. | |
Benefits of a VLAN | |
When set up correctly, virtual LANs can improve the overall performance of busy networks. | |
This file contains hidden or 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
Routers and switches are what tell your data where to go. To get into depth, you need to understand the difference between layers. Here’s a simple breakdown of the “layers”. | |
Layer 1 is the physical layer. This means your CAT5/CAT6 cable or your Wi-Fi connection. Ethernet cables live here, but Ethernet is not fully Layer 1. The physical part of Ethernet is layer 1. | |
Layer 2 is the data link layer. To keep it simple, the only part you’re concerned with is your MAC address. The MAC address is the same as the number on your house, or the serial number on your phone. It’s a unique address assigned to your network card. Because MAC (media access control) indicates how frames are sequenced and synchronized, Ethernet is also part of Layer 2. | |
Layer 3 is the network layer. This is where your IP address lives. TCP/IP is NOT a “Layer 3” protocol, as TCP is Layer 4 and IP is Layer 3. | |
Layer 1 is bits. Layer 2 is frames. Layer 3 is packets. Each layer encapsulates the next: packets are contained in frames, and frames are |