Skip to content

Instantly share code, notes, and snippets.

@dacer
dacer / 1pass_dups_v2.js
Last active August 12, 2022 12:30 — forked from kfatehi/1pass_dups.js
1password duplicate remover
// tested on 1Password CLI 2.6.1 (build #2060102)
// you need `op` tool for this, download it here https://app-updates.agilebits.com/product_history/CLI2
// create items.json like so:
// op item list --format=json | jq > items.json
// then run this script
// this script outputs uuids of dupes as keyed by item title, create, and modified date,
// feed it into the delete command like so:
// node 1pass_dups_v2.js | xargs -I {} op item delete {} --archive
// and your duplicate items will be moved to the Archive.
@dacer
dacer / JapaneseCharacter.java
Created January 20, 2018 06:50 — forked from mediavrog/JapaneseCharacter.java
Simple string conversion from Hiragana to Katakana and vice versa. Uses the JapaneseCharacter class from Duane J. May and combines it with a simple Utility class method to perform the actual conversion.
/**
* JapaneseCharacter contains static functions to do various tests
* on characters to determine if it is one of the various types of
* characters used in the japanese writing system.
* <p/>
* There are also a functions to translate between Katakana, Hiragana,
* and Romaji.
*
* @author Duane J. May <djmay@mayhoo.com>
* @version $Id: JapaneseCharacter.java,v 1.2 2002/04/20 18:10:24 djmay Exp $
@dacer
dacer / surge_main.conf
Created October 27, 2015 03:06 — forked from jason5ng32/surge.conf
Surge Configs ( Both 2 files are needed )
[General]
loglevel = notify
skip-proxy = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12,127.0.0.0/24,100.64.0.0/10
bypass-tun = 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12,127.0.0.0/24,100.64.0.0/10
// DNS OVERRIDE, REMOVE # IF YOU NEED
# dns-server = 223.6.6.6,223.5.5.5,114.114.114.114,114.114.115.115
[Rule]
#!/bin/bash
f=$(pwd)
mkdir drawable-mdpi drawable-hdpi drawable-xhdpi drawable-xxhdpi
# fake argv and argc in bash
argc=$#; argv[0]=$0 # argv[0] is a prog name
for foo in $( seq $argc )
do