Skip to content

Instantly share code, notes, and snippets.

View abrahammartin's full-sized avatar

Abraham Martin abrahammartin

  • University of Cambridge
  • Cambridge
View GitHub Profile
@abrahammartin
abrahammartin / default.md
Created June 22, 2025 07:54 — forked from cablej/default.md
Cluely System prompt

<core_identity> You are an assistant called Cluely, developed and created by Cluely, whose sole purpose is to analyze and solve problems asked by the user or shown on the screen. Your responses must be specific, accurate, and actionable. </core_identity>

<general_guidelines>

  • NEVER use meta-phrases (e.g., "let me help you", "I can see that").
  • NEVER summarize unless explicitly requested.
  • NEVER provide unsolicited advice.
  • NEVER refer to "screenshot" or "image" - refer to it as "the screen" if needed.
  • ALWAYS be specific, detailed, and accurate.
@abrahammartin
abrahammartin / bin_collection.py
Last active February 10, 2019 17:56
How to send a notification to your phone when is bin collection day
from urllib.parse import urlencode
from urllib.request import Request, urlopen
from datetime import date, timedelta, datetime
import requests
# Find the id for the bin collection API traffic when you search your address at
# https://www.scambs.gov.uk/bins/find-your-bin-collection-day/
# If you inspect the network traffic using Chrome's inspector when searching for
# your address you will be able to see the API URL
collections_api = requests.get('https://refusecalendarapi.azurewebsites.net/collection/search/<id>/')
@abrahammartin
abrahammartin / delete-evicted-pods-all-namespaces.sh
Created January 23, 2019 22:55 — forked from psxvoid/delete-evicted-pods-all-namespaces.sh
Delete evicted pods from all namespaces (also ImagePullBackOff and ErrImagePull)
#!/bin/sh
# based on https://gist.github.com/ipedrazas/9c622404fb41f2343a0db85b3821275d
# delete all evicted pods from all namespaces
kubectl get pods --all-namespaces | grep Evicted | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod
# delete all containers in ImagePullBackOff state from all namespaces
kubectl get pods --all-namespaces | grep 'ImagePullBackOff' | awk '{print $2 " --namespace=" $1}' | xargs kubectl delete pod
# delete all containers in ImagePullBackOff or ErrImagePull or Evicted state from all namespaces
@abrahammartin
abrahammartin / gist:8418629
Last active January 3, 2016 05:49
Know all the methods of a class in runtime (Android). Reflection.
Method[] listofMethods = NameOfClass.class.getMethods();
for(Iterator<Method> i = Arrays.asList(listofMethods).iterator(); i.hasNext(); ) {
Method method = i.next();
Log.d(TAG, "Method name: " + method.getName());
Class[] params = method.getParameterTypes();
for(Iterator<Class> j = Arrays.asList(params).iterator(); j.hasNext(); ) {
Class param = j.next();
Log.d(TAG, "Method params for method "+method.getName()+": "+param.getName());
}
}
@abrahammartin
abrahammartin / README.txt
Created April 12, 2013 14:04
Twimight descripctión for Catalan language
Twimight per Twitter
Twimight - un poderós client de Twitter per Android
Twimight és:
- Un client de Twitter per telèfons Android!
- Gratuït, sense anuncis i de codi obert!
- Equipat amb el mode emergència que permet comunicar-te mitjançant Bluetooth quan estàs en una situació problemàtica!
Visita twimight.com per més informació sobre com funciona! Twimight compta amb el suport del projecte SCAMPI.