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
on run {input, parameters} | |
tell application "System Events" | |
set appList to name of every application process where background only is false | |
end tell | |
repeat with appName in appList | |
try | |
do shell script "killall '" & appName & "'" | |
end try | |
end repeat |
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
from typing import List, Tuple | |
import requests | |
def get_reddit_posts(subreddit: str) -> List[Tuple[str, str]]: | |
url = f"https://www.reddit.com/r/{subreddit}/new.json" | |
headers = {"User-agent": "Mozilla/5.0"} | |
response = requests.get(url, headers=headers) | |
data = response.json() |
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
#!/bin/bash | |
# | |
# This script automates the download/update and installation of Grammarly on macOS using curl | |
# Author: Jose Cerrejon | |
# Email: ulysess_.at_gmail.com | |
# Version: 1.0.0 | |
# | |
URL="https://download-mac.grammarly.com/Grammarly.dmg" | |
DMG_PATH="/tmp/Grammarly.dmg" | |
MOUNT_POINT="/Volumes/Grammarly" |
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
#!/bin/bash | |
# This script was created by PiKISS (https://github.com/jmcerrejon/PiKISS). | |
# It reinstalls the Vulkan driver for Mesa. | |
# If you don't want to use it, please make sure you delete the file: /etc/apt/apt.conf.d/99reinstall-vulkan-driver-hook | |
function reinstall_vulkan_driver() { | |
readonly BUILD_MESA_VULKAN_DRIVER_DIR="$HOME/mesa_vulkan/build" | |
if [[ ! -d $BUILD_MESA_VULKAN_DRIVER_DIR ]]; then | |
echo "Vulkan driver not found. Exiting..." |
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
import subprocess | |
def main(): | |
volumes = subprocess.run(['mount'], stdout=subprocess.PIPE).stdout.decode('utf-8').split('\n') | |
for volume in volumes: | |
if '/Volumes/' in volume and 'nodev' in volume: | |
volume_name = volume.split()[2] | |
clean_volume(f"{volume_name}/pelis" if os.path.isdir(f"{volume_name}/pelis") else f"{volume_name}") |
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
#!/bin/bash | |
export TITANIUM_SDK_PATH="$HOME/Library/Application Support/Titanium/mobilesdk/osx/" | |
export CURRENT_APPC_SDK | |
CURRENT_APPC_SDK=$(ls -t "$TITANIUM_SDK_PATH" | head -n 1) | |
export IPHONEUDID="XXX" # iPhone Simulator | |
export IPHONEREALID="XXX" # iPhone 11 | |
export ANDROIDID="android" # Android 10 Google Pixel 3 - 4096 RAM - SDK 29 | |
export ANDROIDREALID="XXX" # Real Android device |
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
#!/bin/bash | |
# | |
# Intall Node.js (all versions) | |
# | |
install_node() { | |
local NODE_VERSION | |
if which node >/dev/null; then | |
read -p "Warning!: Node.js already installed (Version $(node -v)). Do you want to uninstall it (y/n)?: " option | |
case "$option" in |
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
# brew install curl jq | |
# More info at: https://docs.github.com/en/rest/reference/repos#list-forks | |
repo_info() { | |
if [[ $1 == "" ]]; then | |
echo "Please, input a repo. Ex: jmcerrejon/pikiss" | |
return 0 | |
fi | |
curl -H 'Accept: application/vnd.github.v3+json' \ | |
"https://api.github.com/repos/$1/forks?sort=newest" | # sort = newest, oldest, or stargazers | |
jq '.[] | {name: .full_name, updated: .updated_at, stars: .stargazers_count}' |
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/bash | |
# | |
# Description: Zip the current Titanium project on macOS | |
# File: backup.sh | |
# Author: Jose Cerrejon (ulysess_at_gmail.com) | |
# Help: Copy in the root of your Titanium project and Add to package.json the script: "backup": "sh backup.sh", | |
# | |
clear | |
stop_liveview() { |
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
const win = Ti.UI.createWindow({ | |
backgroundImage: '/images/background_bubles.png', | |
backgroundRepeat: false, | |
}); | |
const lbTitle = Ti.UI.createLabel({ | |
color: '#7C34C6', | |
font: { | |
fontSize: 32, | |
}, |
NewerOlder