Skip to content

Instantly share code, notes, and snippets.

View douglasdrumond's full-sized avatar
📷
brb

Douglas Drumond Kayama douglasdrumond

📷
brb
View GitHub Profile
@vladstudio
vladstudio / llm.sh
Last active March 29, 2024 13:21
Raycast LLM custom script
#!/bin/bash
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title LLM
# @raycast.mode fullOutput
# Optional parameters:
# @raycast.icon 🤖
# @raycast.argument1 { "type": "text", "placeholder": "Prompt" }
@dexter-stpierre
dexter-stpierre / README.md
Last active July 11, 2024 15:36
Readwise-Obsidian Workflow

Motivation

I decided to create this workflow based on my belief that if information is synced into my Obsidian vault then that data should be completely owned by the tool that synced it. It should never be edited within my vault, and it should be able to be deleted and resynced (hard resync) from that tool with little to no impact to my vault. If you don't agree with this mindset then no worries! This workflow can still help you keep track of which articles you have processed and which ones have new highlights to process. Even if you think this workflow isn't for you, you might learn something in this that might help you solve some problems in your own vault.

Since I only edit highlights and notes from Readwise in Readwise I had to have a way of knowing which highlights I have reviewed/processed and which highlights I still need to do that for. Since I wanted to be abnle to do a hard resync that had to live completely outside of the information that Readwise tracks in my vault. So I created a system in wh

@luzfcb
luzfcb / template_LGPD.md
Last active July 22, 2024 03:30
Template LGPD - Template para solicitar exclusão de dados conforme a LGPD - Lei Geral de Proteção de Dados do brasil. LEI Nº 13.709, DE 14 DE AGOSTO DE 2018. Disclaimer: Não sou advogado e não me responsabilizo por qualquer coisa decorrente do uso desde conteudo. Use por sua conta e risco.

Olá <NOME_EMPRESA>.

Vocês estão me enviando <email, ligação, SMS, via plataforma Whatsapp, via plataforma Telegram> comerciais não-solicitados, portanto SPAM.

No dia vocês enviaram ao meu uma mensagem comércial, com o seguinte texto:

<MENSAGEM>
@pmow
pmow / flickrflatten.py
Created December 15, 2018 16:35
flickr_flatten
import os
import fnmatch
import json
from functions import *
verbose = 0
jsonpath= '/mnt/media2/Flickr.Dump/json/'
mediapath= '/mnt/media2/Flickr.Dump/media/'
outputpath= '/mnt/media2/Flickr.Dump/output/'
package com.electricobjects.client.onboarding;
import android.app.Dialog;
import android.os.Bundle;
import android.support.design.widget.FloatingActionButton;
import android.support.v4.content.ContextCompat;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
@nickbutcher
nickbutcher / 10: animator-morph_ridge_2_to_tick.xml
Last active September 4, 2024 05:58
Demonstrating an animation for scanning a fingerprint and showing success or failure. This uses a number of AnimatedVectorDrawables (https://developer.android.com/reference/android/graphics/drawable/AnimatedVectorDrawable.html) to 'morph' parts of the fingerprint into the tick or cross to report success or failure. It also uses a moving clip-pat…
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright (C) 2015 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@prakhar1989
prakhar1989 / richhickey.md
Last active November 8, 2023 17:19 — forked from stijlist/gist:bb932fb93e22fe6260b2
richhickey.md

Rich Hickey on becoming a better developer

Rich Hickey • 3 years ago

Sorry, I have to disagree with the entire premise here.

A wide variety of experiences might lead to well-roundedness, but not to greatness, nor even goodness. By constantly switching from one thing to another you are always reaching above your comfort zone, yes, but doing so by resetting your skill and knowledge level to zero.

Mastery comes from a combination of at least several of the following:

@grantland
grantland / post.md
Last active February 9, 2023 05:09
RecyclerView item onClick

RecyclerView item onClick

RecyclerView does not have an OnItemClickListener like it's predecessor, ListView. However, detecting item clicks is pretty simple.

Set an OnClickListener in your ViewHolder creation:

private class MyAdapter extends RecyclerView.Adapter<MyAdapter.ViewHolder>  {

    public static class ViewHolder extends RecyclerView.ViewHolder
@lelandbatey
lelandbatey / whiteboardCleaner.md
Last active November 11, 2024 22:46
Whiteboard Picture Cleaner - Shell one-liner/script to clean up and beautify photos of whiteboards!

Description

This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"

Results

@tyvsmith
tyvsmith / dex-count.sh
Created July 22, 2013 18:45
"`classes.dex` method count helpers. Requires smali/baksmali from https://code.google.com/p/smali/ and dexdump from the build-tools in the Android SDK be on your PATH." Use this to keep track of methods and fields in your apk. They are both limited to 65536. Example use: $ source dex-count.sh; $ dex-field-count classes.dex; Original method scrip…
function dex-method-count() {
cat $1 | head -c 92 | tail -c 4 | hexdump -e '1/4 "%d\n"'
}
function dex-method-count-by-package() {
dir=$(mktemp -d -t dex)
baksmali $1 -o $dir
for pkg in `find $dir/* -type d`; do
smali $pkg -o $pkg/classes.dex
count=$(dex-method-count $pkg/classes.dex)