iPhone Memo

Shortcuts Placing Location Settings ON/OFF on the Home Button Create a shortcut to open the URL and specify the following for the URL: prefs:root=Privacy&path=LOCATION Placing it on the home button makes toggling OFF/ON easier. Kindle Auto-Read Aloud on iPhone Enabling AssistiveTouch Settings → Accessibility → Touch → AssistiveTouch → ON Screen Reading Open the Kindle app and select screen reading from AssistiveTouch◎. iPhone Reading Aloud Challenges Pauses on image pages - Japanese books often have numerous inserted images, unlike English books’ translations, resulting in frequent pauses. Fluency - English books pose no issue, but Japanese books sometimes encounter difficulties in reading aloud. Functionality - Instances where reading aloud fails to start, indicating slight instability. Forced Reset Press the volume up button. Press the volume down button. Long-press the side button. Release the button when the Apple logo appears. Official Apple Guide ...

March 9, 2024 · 3 min · 545 words · 0xuki

Quick Introdution of hardhat

When developing smart contracts using Solidity, efficient development processes and reliable testing are crucial. Therefore, in this article, we’ll introduce and explore Hardhat, a handy tool for Solidity developers. What is Hardhat? Hardhat is a development tool for building, testing, and deploying smart contracts on the Ethereum blockchain. Formerly known as Buidler, it was rebranded as Hardhat in 2020. Here are some key features of Hardhat: Customizable Task Runner: Hardhat provides a flexible task runner to execute various tasks required for Ethereum development. This allows for automation of tasks such as building, compiling, testing, and deploying contracts. ...

March 9, 2024 · 2 min · 332 words · 0xuki

DoS/DDoS Attack

A Distributed Denial-of-Service (DDoS) attack is a malicious attempt to disrupt the normal operation of a targeted server, service, or network by overwhelming it with a flood of internet traffic. These attacks are executed by leveraging a multitude of compromised computer systems, often referred to as “bots” or “zombies,” which are under the control of the attacker. DDoS attacks can cause significant downtime, financial loss, and reputational damage to the targeted entity. ...

March 8, 2024 · 3 min · 586 words · 0xuki

Happy Hacking Keyboard for mac

Happy Hacking Keyboard ⌨ I use the HKKB Type-S on Mac/OSX and have noted some recommended key configurations. Configuration of DIP Switches on the Backside Mac Compatibility SW1: OFF SW2: ON DEL key as Backspace SW3: ON SW4 and SW5 should be set to OFF. PowerSave SW6: ON/OFF It’s up to personal preference, but for efficiency, OFF is recommended. Combination with Mac App Magnet As the keyboard lacks arrow keys, I’ve configured the following shortcuts using the Command key for screen arrangement. This, coupled with the HKKB’s cursor keys, proves to be very convenient. ...

March 3, 2024 · 1 min · 142 words · 0xuki

What is a Rubber Hose Attack?

A Rubber Hose Attack refers to a technique in cryptography and cybersecurity where physical or psychological coercion is used to extract information. This term is often used metaphorically to contrast with theoretical or technical methods of breaking encryption. Background of the Term The name comes from the idea of “beating someone with a rubber hose,” symbolizing the use of violence, threats, or psychological pressure instead of technical hacking to obtain sensitive data. ...

December 23, 2023 · 2 min · 417 words · 0xuki

Errors in Python

1. Invalid comparison between dtype=datetime64[ns, America/New_York] and datetime64 Error This error occurs when comparing timestamps in Yahoo Finance with different timezones. Solution To fix this error, we need to localize the timestamps to UTC before comparing them. start = np.datetime64(datetime.date.today() - datetime.timedelta(days=freq)) df.index = df.index.tz_localize(None) # Localize to UTC df = df[start < df.index] 2. Could not import the lzma module Error This error occurs when importing pandas 1.0 or later with an incomplete Python installation. Solution To fix this error, we need to install the xz module using brew and reinstall pandas. ...

January 3, 2023 · 1 min · 108 words · 0xuki

Python Function: Convert Percentage Strings to Numbers

Easily convert percentage values stored as strings (e.g., “85%”) into numeric values for analysis in Python! 🚀 Why Use This Function? 🤔 📊 Data Cleaning: Many datasets store percentages as strings, which are not suitable for calculations. 🧹 Preprocessing: Converting these to numbers is essential for machine learning and data analysis. Function Example 🐍 def str_to_rate(s): if pd.isnull(s) == False: return float(s.replace('%', '')) else: return s How to Use 🛠️ col = "ReplyRate" df[col] = df[col].apply(str_to_rate) 🔄 This will convert all percentage strings in the column to float numbers (e.g., “85%” → 85.0). ⚠️ Null values will remain unchanged.

October 29, 2022 · 1 min · 99 words · 0xuki

Solidity Functions 🛠️

Solidity functions are the building blocks of smart contracts, allowing you to define the behavior and logic of your decentralized applications. They can be called internally or externally, and their visibility and state permissions can be controlled through modifiers. Understanding how to properly implement functions is crucial for creating efficient and secure smart contracts. Here are some basic function examples: Addition ➕ function add(uint a, uint b) public pure returns (uint){ return a + b; } Message 📝 function add(uint a, uint b) public pure returns (uint){ return a + b; } Solidity Visibility Modifiers 👁️ private 🔒 : Only accessible within the current contract internal 🔐 : Accessible within the current contract and inherited contracts external 🌐 : Only callable from outside the contract (via transactions or other contracts) public 🔓 : Accessible from anywhere (no restrictions) State Permission Modifiers ⚡ If you don’t specify pure/view, the function will consume gas. Keep this in mind! ...

October 15, 2022 · 1 min · 180 words · 0xuki

Ubuntu on Azure Notes

Regular Maintenance sudo apt update sudo apt upgrade Error during Regular Maintenance: 11: Resource temporarily unavailable This is a solution for handling resource shortage detected during sudo upgrade. E: Could not get lock /var/lib/dpkg/lock – open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it? Check if apt exists with the ps command. If it does, wait a bit and retry, or if possible, restarting may be quicker. ...

October 1, 2022 · 1 min · 201 words · 0xuki

Social Engineering ソーシャルエンジニアリング

Social Engineeringとは ソーシャルエンジニアリングとは、不正な理由でターゲットに特定の情報を開示させたり、 特定の行動を取らせたりすることを目的としたすべてのテクニックのことを指す。 https://www.enisa.europa.eu/topics/csirts-in-europe/glossary/what-is-social-engineering Quid pro quo 何かのための何か Quid pro quoはギリシャ語で、代わり・代替などの意味。 英語ではSomething for something. 攻撃者はターゲットに対して何か利益のあることを提案して、 その見返りとして攻撃をしかけること。 低レベルの攻撃者が行うソーシャル・エンジニアリング攻撃の1つ。 例:攻撃者はある企業のITサポートを騙り、従業員にたいして、 ソフトウェアのアップデートやセキュリティ製品の導入をサポートする。 その過程で、従業員の端末にマルウェアやRATをインストールすること。 Eliciation 誘導 Elicitationとは、論法や話法によって結論(例えば真理)を引き出す、引き出すという意味。 特定のクラスの行動を呼び起こす(引き出す)刺激と定義されることもある。 米国政府の国家安全保障局では、Elicitationを “一見普通の無邪気な会話の中で、微妙に情報を引き出すこと “と定義している。 この会話は、レストラン、ジム、保育園など、ターゲットがいる場所ならどこでも発生する可能性がある。 Elicitationが有効なのは、リスクが低く、発見が困難な場合が多いからだ。ほとんどの場合、 ターゲットはどこで情報が入手されたかを知りません。

September 20, 2022 · 1 min · 31 words · 0xuki