This file contains 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
#!/bin/bash | |
DEVICE_UDID="" | |
# Run the command and store the result in a variable | |
apps=$(idb list-apps --udid "$DEVICE_UDID") | |
echo "$apps" | while IFS= read -r app; do | |
# Parse the app details | |
id=$(echo "$app" | cut -d '|' -f 1 | tr -d '[:space:]') |
This file contains 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
#!/bin/sh | |
# Check for "TODO" in staged files | |
TODO_FOUND=$(git diff --cached --name-only --diff-filter=AM | grep -E '\.(kt|java|xml|kts|properties)$' | xargs -r grep -l 'TODO') | |
if [ ! -z "$TODO_FOUND" ]; then | |
echo "🔴 These TODOs are not refering to any task" | |
echo "$TODO_FOUND" | |
echo "Consider addressing the TODOs or creating tickets for them before committing." | |
# Uncomment the next line to block the commit until TODOs are addressed |
This file contains 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
// #popclip extension for ChatGPT | |
// name: ChatGPT Quick Actions | |
// icon: iconify:logos:openai-icon | |
// language: javascript | |
// module: true | |
// entitlements: [network] | |
// options: [{ | |
// identifier: apikey, label: API Key, type: string, | |
// description: 'Obtain API key from https://platform.openai.com/account/api-keys' | |
// }] |
This file contains 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
# Add it in ~/.local/gpt-cli/gitcommit | |
# Use "gptcli gitcommit" to generate a commit message | |
name: gitcommit | |
description: "ai commit plugin for gpt cli" | |
repository: "mahdi-malv" | |
author: "mahdi-malv" | |
help: | | |
Creates commit based on git diff and created to do better than GitKraken |
This file contains 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
Let's have a chat and discussion about some different topics. But there's an important tip that you need to take into account when trying to respond to me. | |
I want you to adjust the preciseness and depth of the conversation based on a Level that I specify on each prompt I write to you. | |
"L1": Level 1, Respond with the shortest and most precise answer | |
"L2": Level 2, Respond with more details, providing a small overview of the whole thing about the prompt | |
"L3": Level 3, go a bit more detailed and comprehensive that Level 2. provide more details. | |
"L4": Level 4, when specified, try to respond with as much details and you can while keeping the conversation not too long. | |
"L5": Level 5, explain in the most detailed possible way providing a clear and complete response with examples, references and everything needed to give a complete answer | |
Note: If no level was specified, assume Level 1 is requested. |
This file contains 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
# Put it in ~/.config/gpt-cli/code/code.yml | |
# add an alias for simplicity | |
# alias 'c?'='gptcli code' | |
name: code | |
description: "AI assistant for code" | |
author: "mahdi-malv" | |
help: | | |
code ask plugin for gptcli | |
Usage: |
This file contains 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
# Write the file in .config/gpt-cli/plugins/ask/ask.yml | |
# Create an alias to make the usage even simpler | |
# alias 'q?'='gptcli ask' | |
# will make it as simple as → q? "How far is the damn moon?" L1 | |
name: ask | |
description: "normally ask something from AI" | |
author: "mahdi-malv" |
This file contains 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
#! /bin/bash | |
##################################################### | |
# Fetch DNS configurations from shecan.ir # | |
##################################################### | |
set -e | |
reset=`tput sgr0` | |
red=`tput setaf 1` |
This file contains 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
static boolean isApplicationForeground(Context context) { | |
KeyguardManager keyguardManager = | |
(KeyguardManager) context.getSystemService(Context.KEYGUARD_SERVICE); | |
if (keyguardManager != null && keyguardManager.isKeyguardLocked()) { | |
return false; | |
} | |
ActivityManager activityManager = | |
(ActivityManager) context.getSystemService(Context.ACTIVITY_SERVICE); |
This file contains 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
python3 -c """ | |
import shutil | |
import glob | |
for i in glob.glob('**/build/',recursive=True): | |
print(f'Deleting {i}') | |
try: | |
shutil.rmtree(i) | |
except OSError: | |
print(f'Failed to remove {i}') |
NewerOlder