Skip to content

Instantly share code, notes, and snippets.

Registered Name: https://zhile.io
License Key: 48891cf209c6d32bf4
// Shortcut: ctrl shift j
import "@johnlindquist/kit"
const data = await kitPath()
revealInFinder(data)
@fcrespo82
fcrespo82 / AlertTest.js
Created October 16, 2020 13:09
Scriptable Helper Scripts
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: yellow; icon-glyph: check-double;
let alertUtils = importModule("AlertUtils")
// Ask for input with validation
let input = await alertUtils.askInput({
title: "Enter phone number",
validate: (value) => {
if (isNaN(parseInt(value))) {
@fcrespo82
fcrespo82 / TimeZones.js
Last active December 11, 2021 00:55
Scriptable time zones widget
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: cyan; icon-glyph: clock;
// TimeZones Widget for Scriptable
// Author: Fernando Crespo
// Version: 1.0
//
// This script supports all widget sizes, but the number of timezones differ as follow:
//
@fcrespo82
fcrespo82 / SearchGooglePlaces.py
Last active September 29, 2021 23:01
Python script for pythonista (iOS app) to search google places API and open the first result in Apple Maps
# -*- coding: utf-8 -*-
import requests, json, webbrowser, urllib, sys
API_KEY = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' # Get your api key from https://code.google.com/apis/console/, you MUST add the Places API permission to it
GOOGLE_PLACES_URI = 'https://maps.googleapis.com/maps/api/place/textsearch/json?query={0}&sensor=false&key={1}'
APPLE_MAPS_URI = 'safari-http://maps.apple.com/?q={0}'
#call this script in pythonista for ios pythonista://GoogleToAppleMaps?action=run&argv=[prompt]
def main():
@fcrespo82
fcrespo82 / deploy.sh
Created November 6, 2020 14:29
Kubernetes - Deploy dashboard, create user and expose it on ingress
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0/aio/deploy/recommended.yaml
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: ServiceAccount
metadata:
name: admin-user
namespace: kubernetes-dashboard
EOF
@fcrespo82
fcrespo82 / Schedule WhatsApp.js
Last active October 31, 2020 12:02
Schedule WhatsApp messages
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: deep-green; icon-glyph: comment-alt;
// If you need to send message from another app customize the url here
function getMessageURL(item) {
return `https://wa.me/${item.number}/?text=${encodeURIComponent(item.message)}`
}
async function createTable(data) {
@fcrespo82
fcrespo82 / Dice.js
Last active September 30, 2020 17:06
Dice roller in widget for Scriptable iOS app
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: deep-green; icon-glyph: dice;
let widget = new ListWidget()
widget.backgroundColor = Color.white()
let padding = 10
widget.setPadding(padding,padding,padding,padding)
let dot = "⚫️"

Keybase proof

I hereby claim:

  • I am fcrespo82 on github.
  • I am fcrespo82 (https://keybase.io/fcrespo82) on keybase.
  • I have a public key ASCl04WJAhzfhkVNvPBcVSM83DCElgpDsQ4jvBCQeK-HqQo

To claim this, I am signing this object:

@fcrespo82
fcrespo82 / iTunesLiveTile.html
Last active December 8, 2017 20:26
Simple javascript helper to acquire iTunes data from the lookup API.
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title>iTunes Live Tile</title>
</head>
<body>
<div id='iltdemo'>
Icon: <img id='image'></img><br/>
Name: <span id='name'></span><br/>