Misc

26 Notes
+ Spotify D-BUS control (Jan. 19, 2023, 10:39 p.m.)

Play/Pause: dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause Next: dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next Previous: dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous

+ Display technologies (April 1, 2022, 8:43 a.m.)

OLED: It stands for Natural Light-Emitting Diode, a type of LED technique that utilizes LEDs wherein the light is of organic molecules that cause the LEDs to shine brighter. These organic LEDs are in use to make what are thought to be the best display panels in the world. AMOLED: AMOLED stands for Active Matrix Organic Light Emitting Diode. This type of display is generally for large platforms. It contains TFT, which further consists of a storage capacitor. It also works on the same principle as OLED displays.

+ Setup vs. Set-Up vs. Set Up (Sept. 22, 2021, 10:25 a.m.)

The noun setup is usually styled as a solid compound (that is, as a single word) in American English and as a hyphenated compound (set-up) in British English. The noun may be used attributively (that is, as an adjective) in such phrases as setup man (“someone who makes machine tool adjustments”) and setup tool (“software that facilitates the installation of a computer program”). The verb set up, on the other hand, is usually found as an open compound (two words, no hyphen) in both American and British English.

+ Postman - Automatically set token (Sept. 20, 2021, 11:56 p.m.)

https://learning.postman.com/docs/writing-scripts/script-references/test-examples/ 1- Add an environment variable "TOKEN". 2- Create a new request with the URL to login API. 3- Provide the credentials to log in, so that the token is returned. 4- In the request from step 3, go to the "Tests" tab, and enter the following value: const responseJSON = pm.response.json(); pm.environment.set("TOKEN", responseJSON.sessionId); Instead of the "sessionID" it could be also "access_token" or any other key which is returned from the request. 5- Now on every login, the new token is replaced. ------------------------------------------------------------------------------------------------------------------ Access the response headers: console.log(pm.response.headers.get('Set-Cookie')) The responseHeaders is already declared initially inside each response. If it's not, you can declare it using: responseHeaders = pm.response.headers.all() ------------------------------------------------------------------------------------------------------------------ Printing values in postman: console.log(responseHeaders); ------------------------------------------------------------------------------------------------------------------ To disable cookies on a request, go to the "Settings" panel below the URL bar, and from the toggle buttons enable the "Disable cookie jar". ------------------------------------------------------------------------------------------------------------------

+ Sequence Diagrams (Aug. 6, 2021, 11:52 a.m.)

"Actors" are represented by: stick figures "Objects" are represented by: rectangles ------------------------------------------------------------------- Lifeline: Lifelines are the vertical dashed lines that show the existence of an object or actor over time. ------------------------------------------------------------------- Message: Messages show the information being sent between objects. They're represented by a dashed or solid line. ------------------------------------------------------------------- Return message: When an object sends a message back, this is called a reply or return message, and they're always represented by a dashed line. Return lines often move from right to left. That is not always the case though. ------------------------------------------------------------------- Alternative frame: An alternative frame symbolizes a choice between two or more message sequences. These choices are usually mutually exclusive. ------------------------------------------------------------------- Activation boxes: Activation boxes show when and how long an object is performing a process. This shows us at a glance when objects are active and when they're idle. -------------------------------------------------------------------

+ Interaction and Sequence Diagrams (Aug. 6, 2021, 11:13 a.m.)

Interaction diagrams are used in UML to establish communication between objects. It does not manipulate the data associated with the particular communication path. Interaction diagrams mostly focus on message passing and how these messages make up one functionality of a system. Interaction diagrams are designed to display how the objects will realize the particular requirements of a system. The critical component in an interaction diagram is lifeline and messages. ---------------------------------------------------------------------------- What is a Sequence Diagram? A sequence diagram simply depicts the interaction between objects in sequential order. The purpose of a sequence diagram in UML is to visualize the sequence of a message flow in the system. The sequence diagram shows the interaction between two lifelines as a time-ordered sequence of events. - A sequence diagram shows an implementation of a scenario in the system. Lifelines in the system take part during the execution of a system. - In a sequence diagram, a lifeline is represented by a vertical bar. - A message flow between two or more objects is represented using a vertical dotted line that extends across the bottom of the page. - In a sequence diagram, different types of messages and operators are used which are described above. - In a sequence diagram, iteration and branching are also used. ----------------------------------------------------------------------------

+ Jira - Story Points (Jan. 18, 2021, 8:48 a.m.)

1, 2, 3, 5, 8, 13, 20, 40, 100.

+ Difference between GB and GiB (Jan. 12, 2021, 8:36 p.m.)

Unit of measure Bytes Kilobyte (KB) 1000¹ = 1,000 Megabyte (MB) 1000² = 1,000,000 Gigabyte (GB) 1000³ = 1,000,000,000 Terabyte (TB) 1000⁴ = 1,000,000,000,000 Petabyte (PB) 1000⁵ = 1,000,000,000,000,000 Kibibyte (KiB) 1024¹ = 1,024 Mebibyte (MiB) 1024² = 1,048,576 Gibibyte (GiB) 1024³ = 1,073,741,824 Tebibyte (TiB) 1024⁴ = 1,099,511,627,776 Pebibyte (PiB) 1024⁵ = 1,125,899,906,842,624

+ Scrum and Kanban (Oct. 9, 2020, 11:35 a.m.)

These two are Agile methodologies. --------------------------------------------------------------- What is Scrum? Scrum is a tool used to organize work into small, manageable pieces that can be completed by a cross-functional team within a prescribed time period (called a sprint, generally 2-4 weeks long). To plan, organize, administer, and optimize this process, Scrum relies on at least three prescribed roles: the Product Owner (responsible for initial planning, prioritizing, and communication with the rest of the company), the Scrum Master (responsible for overseeing the process during each sprint), and the Team Members (responsible to carry out the purpose of each sprint, such as producing software code.) Another common tool used by scrum teams is the Scrum Board – a visual representation of the workflow, broken down into manageable chunks called “stories”, with each story moved along the board from the “backlog” (the to-do list), into work-in-progress (WIP), and on to completion. --------------------------------------------------------------- What is Kanban? Like Scrum, Kanban encourages work to be broken down into manageable chunks and uses a Kanban Board (very similar to the Scrum Board) to visualize that work as it progresses through the workflow. Where Scrum limits the amount of time allowed to accomplish a particular amount of work (by means of sprints), Kanban limits the amount of work allowed in any one condition (only so many tasks can be ongoing, only so many can be on the to-do list.) --------------------------------------------------------------- How are Scrum and Kanban different? Scrum processes place heavy emphasis on schedule. On a Kanban team, there are no required time boxes or iterations. On scrum teams, there are at least three roles that must be assigned: The Product Owner, Scrum Master, and Team Members. Under Kanban, no set roles are prescribed. On a Scrum board, the columns are labeled to reflect periods in the workflow beginning with the sprint backlog and ending with whatever fulfills the team’s definition of done. On a Kanban board, the columns are likewise labeled to show workflow states, but with one vital difference: they also publish the maximum number of stories allowed in each column at any one time. ---------------------------------------------------------------

+ Times (Oct. 1, 2020, 2:28 p.m.)

CET - Central European Time CEST - Central European Summer Time CEDT - Central European Daylight Time EET - Eastern European Time EEST - Eastern European Summer Time UTC - Coordinated Universal Time MET - Middle European Time

+ Western Digital HDD Colors (June 29, 2020, 8:44 a.m.)

WD Blue برای کامپیوترهای خانگی و کارهای روزمره مناسب هستند The WD HDD Blue is very reliable and is available as an internal HDD or as an SSD. Blue is made for general use; for people that use their computers every day for activities like work, internet browsing, and casual gaming. The revolution per minute varies from one model to another; there are models that have 5400 rpm and others that have 7200 rpm. WD Blue is suitable for storing anything that one needs including music, games, and pictures. -------------------------------------------------------------------------- WD Green به علت سرعت کمی که دارند برای کارهای محاسباتی توصیه نمی‌شود. این هارد برای کسانی که اهل آرشیو کردن اسناد مختلف هستند مناسب است و برای ذخیره اطلاعات در حجم بالا استفاده می‌شود. WD Green performed a similar role as WD Blue – so much so that they started to merge the two lines a few years ago – and people tended to prefer the Blue model. Western Digital stopped manufacturing the original WD Green a while back and replaced it with a SATA SSD. You can no longer get Green as an HDD. -------------------------------------------------------------------------- WD Black برای کارهای محاسباتی و سرعتی مثل بازی‌ها مناسب هستند. در هاردهای مشکی از دو پردازنده استفاد می‌شود. WD Black offers maximum performance because of the capacity of its drive that ranges from 1TB to 6TB. WD Black is suitable for PCs that are used in a workstation or for gamers because their performance and usability are very high. The cache of WD Black is 128MB compared to WD Blue that has 64MB cache. All models of WD Black versions have a five-year warranty and 7200rpm. This is a high-performance HDD and, whilst it is available as an SSD, the majority of people buy Western Digital Black for an internal hard drive, or as an external HDD. -------------------------------------------------------------------------- WD Red به علت توانایی کار کردن شبانه روزی بدون عیب و ایراد برای استفاده در شبکه طراحی شده است. WD Red and WD Red Pro are designed to be slotted inside the Network Assisted Storage (NAS). WD Red is only compatible with the NAS systems. The capacities of the WD Red range from 1TB to a massive 14TB. They also get support from the RAID configuration. The WD Reds excel more when used in reading performance than the write performance. Red can be picked up as an SSD, but people mainly opt for the HDD versions as it’s designed primarily to be a high performing NAS storage solution. This helps to increase efficiency and productivity in business computer systems. -------------------------------------------------------------------------- WD Purple برای دستگاه های DVR و NVR (سیستم‌های حفاظتی مثل دوربین‌های مدار بسته) استفاده می‌شوند. WD Purple is the best surveillance drive for CCTV systems at home or in business workplaces. The Purple HDD color from WD can sustain its performance 24/7 and is capable of supporting up to 64 HD cameras at the same time. It is mainly used by the security systems to record and store videos. It is the exact opposite of WD Red because it excels well in writing performance than reading performance. WD Purple utilizes a technology called ALL FRAME that helps in minimizing errors while recording and saving videos. The storage capacities range from 1TB to 14TB. Purple is also available as SD & microSD cards for on-the-go surveillance like dash cams, body cams, drones, and more. -------------------------------------------------------------------------- WD Gold برای مرکز داده یا دیتا سنتر مناسب می‌باشد. از دو پردازنده نیز استفاده می‌کنند WD Gold is mainly used in enterprise-class storage systems and data centers. It often works well when used in servers, and can handle a lot of sophisticated systems simultaneously. This is the most expensive color HDD from WD (per terabyte) and is available from 1TB to 14TB. This HDD color is one of the most reliable HDDs in the world; it can handle a staggering 2.5 million hours MTBF (Mean Time Between Failures). WD Gold features technology such as a multi-axis shock sensor, stable track, and dynamic fly height. It comes with a warranty of five years. --------------------------------------------------------------------------

+ Profiling (April 13, 2020, 7:11 p.m.)

Profiling is a process of measurement metrics of your project, such as server response time, CPU usage, memory usage, etc.

+ Firefox - Addons (Feb. 23, 2020, 10:58 a.m.)

YouTube Video Downloader 1-Click Group https://addons.mozilla.org/en-US/firefox/addon/youtube-download-hd-download/ https://addons.mozilla.org/en-US/firefox/addon/youtube_downloader/ ------------------------------------------------------------------------------

+ NextCloud Server (Feb. 8, 2020, 3:34 p.m.)

1- Install all the dependencies: apt install apache2 libapache2-mod-php mariadb-server php-xml php-cli php-cgi php-mysql php-mbstring php-gd php-curl php-zip 2- Restart Apache to make sure that it's using the PHP module: systemctl restart apache2 3- Nextcloud keeps track of everything in a database. Plus, like most web applications, it stores its own information and settings in it too. run the built-in secure installation script to remove junk and set up your admin account. sudo mysql_secure_installation Follow the instructions, and set up a new root password when asked. You can accept the defaults for everything. 4- Sign in to MariaDB using the root password that you just established: mysql -u root -p CREATE DATABASE nextcloud; CREATE USER 'nextclouduser'@'localhost' IDENTIFIED BY 'yourpassword'; GRANT ALL ON nextcloud.* TO 'nextclouduser'@'localhost'; FLUSH PRIVILEGES; \q 5- Download Nextcloud from the following link: wget https://download.nextcloud.com/server/releases/nextcloud-18.0.0.zip unzip nextcloud-*.zip cp -r nextcloud /var/www/html/nextcloud chown -R www-data:www-data /var/www/html/nextcloud 6- Open your browser, and navigate to your Nextcloud server: http://<ip_address>/nextcloud: You'll arrive on the Nextcloud setup page. Enter a username and password for your admin user. Next, scroll down, and enter the information for the database that you set up, including the username and password of the user you created to manage it.

+ AHCI vs. IDE vs. RAID (Feb. 7, 2020, 12:34 p.m.)

IDE, AHCI, and RAID are all operating modes in SATA environments. Each has its relative strengths and weakness. IDE and AHCI are peripheral component interconnect (PCI) devices that move data between system memory and SATA controllers. Both add more advanced storage features. AHCI is newer than IDE and enables more advanced storage features. However, both are older technologies that are not in widespread usage in storage arrays, especially with the growth of SSDs. RAID is hardware or software that provides redundancy in multiple device environments, and accelerates HDDs. Like AHCI and IDE, RAID supports SATA controllers, and many RAID products enable AHCI upon installation to provide advanced storage features for single-disk applications. In practice, the technologies are viewed as such: - IDE is largely an obsolete technology, used only in older scenarios. - AHCI still acts as a bus in some older SATA HDD arrays and hybrid arrays. - RAID is still widely deployed for HDD and hybrid array data protection and redundancy. ------------------------------------------------------------------------ What is AHCI? Advanced Host Controller Interface (AHCI) is an Intel computer standard that is limited to Intel chipsets. AHCI has been around since 2004, where it replaced the older IDE/Parallel ATA interface in new devices. AHCI is not identical to SATA but acts as the bus between the host and AHCI or SATA controllers on the motherboard. The protocol improves storage management features on the SATA controller by enabling Native Command Queuing (NCQ) and hot-swapping. ------------------------------------------------------------------------ What is IDE? Integrated Drive Electronics (IDE) is older than AHCI. It specifies a computer interface that connects disk storage with the motherboard bus. In 1986, Western Digital released the IDE spec in partnership with Compaq and Control Data Corp. At the time, IDE-supported ATA drives were much faster than standard SCSI drives, and the market widely deployed the new IDE platforms. Also called parallel ATA, or PATA, IDE interconnects transfer 16 bits at a time across two device connections per channel. ------------------------------------------------------------------------ What is RAID? RAID, or “redundant array of independent disk” is another mature technology but is widely deployed in storage environments. RAID provides high availability and data protection across multiple nodes, which enables HDDs and SSDs to keep running after the loss of a device. RAID is available for SSD arrays. But since it does not accelerate SSD performance, all-flash arrays are likelier to use proprietary RAID that provides redundancy and accelerate performance on SSDs. The most widely used RAID types, or levels, are 0, 1, 5, 6, and 10. There are also SSD-specific RAID options in the market. Raid 0: Striping. Splits files and stripes the data across two disks or more, treating the striped disks as a single partition. RAID 1: Mirroring. Copies protected disk to 2nd disk. If the mirrored disk fails, the functioning disk takes over. RAID 5: Striping with Parity. Distributes striping and parity (raw binary data containing data values) at a block level. RAID 6: Striping with double parity. Like RAID 5, but with a minimum of 4 disks. RAID 10: Striping and Mirroring. Stripes across at least 4 disks for higher performance, and mirrors for redundancy. SSDs can use traditional RAID levels. However, although RAID can improve performance on HDDs, SSDs native high speeds do not benefit from RAID speed enhancements. SSD vendors are concentrating on adding proprietary RAID functions for all-flash array. ------------------------------------------------------------------------

+ HTTP Status Codes (Jan. 15, 2020, 2:48 p.m.)

https://httpstatuses.com/ 1×× Informational 100 Continue 101 Switching Protocols 102 Processing 2×× Success 200 OK 201 Created 202 Accepted 203 Non-authoritative Information 204 No Content 205 Reset Content 206 Partial Content 207 Multi-Status 208 Already Reported 226 IM Used 3×× Redirection 300 Multiple Choices 301 Moved Permanently 302 Found 303 See Other 304 Not Modified 305 Use Proxy 307 Temporary Redirect 308 Permanent Redirect 4×× Client Error 400 Bad Request 401 Unauthorized 402 Payment Required 403 Forbidden 404 Not Found 405 Method Not Allowed 406 Not Acceptable 407 Proxy Authentication Required 408 Request Timeout 409 Conflict 410 Gone 411 Length Required 412 Precondition Failed 413 Payload Too Large 414 Request-URI Too Long 415 Unsupported Media Type 416 Requested Range Not Satisfiable 417 Expectation Failed 418 I'm a teapot 421 Misdirected Request 422 Unprocessable Entity 423 Locked 424 Failed Dependency 426 Upgrade Required 428 Precondition Required 429 Too Many Requests 431 Request Header Fields Too Large 444 Connection Closed Without Response 451 Unavailable For Legal Reasons 499 Client Closed Request 5×× Server Error 500 Internal Server Error 501 Not Implemented 502 Bad Gateway 503 Service Unavailable 504 Gateway Timeout 505 HTTP Version Not Supported 506 Variant Also Negotiates 507 Insufficient Storage 508 Loop Detected 510 Not Extended 511 Network Authentication Required 599 Network Connect Timeout Error

+ Telegram Font Problem (Sept. 10, 2019, 10:43 a.m.)

1- Download a TTF font: https://github.com/rastikerdar/vazir-font/tree/master/dist 2- Create a directory and copy the font to it: Make sure to rename the file to small case letters. mkdir ~/.fonts/ 3- Edit the Telegram font config file: vim ~/.local/share/TelegramDesktop/tdata/fc-custom-1.conf Add this block after all the <match> tags: <match target="pattern"> <test qual="any" name="family"> <string>Vazir</string> </test> <edit name="family" mode="assign" binding="same"> <string>Vazir</string> </edit> </match>

+ CAPTCHA (Oct. 14, 2018, 9:09 a.m.)

CAPTCHA is an acronym for Completely Automated Public Turing test to tell Computers and Humans Apart. This is a challenging test to differentiate between humans and automated bots based on the response. reCAPTCHA is one of the CAPTCHA spam protection services bought by Google. Now it is being offered for free to webmasters and Google also uses the reCAPTCHA on it’s own services like Google Search. ------------------------------------------------------------- The Turing test, developed by Alan Turing in 1950, is a test of a machine's ability to exhibit intelligent behavior equivalent to, or indistinguishable from, that of a human.

+ List of administrative divisions by country (Sept. 15, 2018, 11:27 a.m.)

https://en.wikipedia.org/wiki/List_of_administrative_divisions_by_country

+ Accuracy of latitude and longitude (July 5, 2018, 7:09 a.m.)

1 10 kilometers 6.2 miles 2 1 kilometer 0.62 miles 3 100 meters About 328 feet 4 10 meters About 33 feet 5 1 meter About 3 feet 6 10 centimeters About 4 inches 7 1.0 centimeter About 1/2 an inch 8 1.0 millimeter The width of paperclip wire. 9 0.1 millimeter The width of a strand of hair. 10 10 microns A speck of pollen. 11 1.0 micron A piece of cigarette smoke. 12 0.1 micron You're doing virus-level mapping at this point. 13 10 nanometers Does it matter how big this is? 14 1.0 nanometer Your fingernail grows about this far in one second. 15 0.1 nanometer An atom. An atom! What are you mapping?

+ Exporting an object as svg from inkscape (May 11, 2019, 12:12 a.m.)

A straight-forward method is the following: Select the object(s) to export. "Resize page to drawing or selection" with Ctrl+Shift+R. "Invert selection" with !, and Del all other objects. "Save As" with Ctrl+Shift+S. Select Optimized SVG as the format if you want to use it on the web.

+ Firefox - DownThemAll addon - exclude 128 MP3s (May 9, 2017, 2:19 p.m.)

/[^128]...\.mp3$/,1080,Full HD,HQ /\/[^\/\?128]+\.mp3$/,mp3 /\/[^\/\?128]+\.mp3$/,320,720p,Full HD,HQ

+ Firefox - Disable Auto Refresh (May 7, 2017, 3:48 p.m.)

about:config accessibility.blockautorefresh

+ Serial Numbers (June 7, 2016, 9:20 a.m.)

VMware Workstation 12: CA5MH-6YF0K-480WQ-8YM5V-XLKV4 ------------------------------------------------------------------- PyCharm + IntelliJ IDEA For any change and update, follow up the comments on this website: http://us.idea.lanyus.com/ 2016.1 https://бэкдор.рф/pycharm-activate-key-3-4-5-2016/ 2016.2 http://jetbrains.tencent.click/ ------------------------------------------------------------------- iLO: 34T6L-4C9PX-X8D9C-GYD26-8SQWM -------------------------------------------------------------------

+ Firefox - A script on this page may be busy, or it may have stopped responding... (April 15, 2015, 2:38 p.m.)

In the Location bar, type about:config and press Enter. Click I'll be careful, I promise! to continue to the about:config page. In the about:config page, search for the preference dom.max_script_run_time, and double-click on it. In the Enter integer value prompt, type 20. Press OK.

+ Web Proxies (Feb. 9, 2015, 11:47 a.m.)

http://buka.link/