Skip to content

Instantly share code, notes, and snippets.

View ryjen's full-sized avatar
🙃

RJ ryjen

🙃
View GitHub Profile
@ryjen
ryjen / listrepos.py
Created February 23, 2024 07:45
List Repositories for xarg actions
#!/usr/bin/env python
import argparse
import json
import logging
import os
import re
import sys
import requests
@ryjen
ryjen / cleanup.sh
Last active February 23, 2024 07:53
cleanup source project folders
#!/usr/bin/env bash
function clean_dir {
for f in $(find . -mindepth 1 -maxdepth 1 -type d -printf "%P\n"); do
if [ "$f" = "node_modules" ]; then
echo "Removing: ${PWD}/node_modules"
rm -rf "$f"
fi
if [ "$f" = ".git" ]; then
echo "Cleaning git repository: $PWD"
@ryjen
ryjen / config.ini
Created February 10, 2022 23:46
Lower Android Emulator Density for Layout Issues
# ~/.android/avd/<name>.avd/config.ini
hw.lcd.density=320
@ryjen
ryjen / itunes_dedupe.applescript
Last active June 29, 2020 07:58
Finds duplicate songs in a selection in itunes
-- Author: Ryan Jennings <robert@ryanjennin.gs>
-- Date: Aug 2, 2019
-- Description:
-- Finds duplicate songs in a selection in itunes
-- Ranked meta data is:
-- 1. song name
-- 2. artist
-- 3. bitrate (ex 320 over 256)
-- 4. duration (ex keep 12:00 as too different from 4:40, but discard 3:50)
@ryjen
ryjen / fbpost
Last active June 23, 2016 16:52
#!/usr/bin/env perl
#
# Summary:
# Sends a post for facebook with or without a link.
# Requirements:
# Create a couple maker and facebook recipes in IFTTT.com
# 1) text post named 'post_facebook' with value1 as the content
# 2) link post named 'post_link_facebook' with value1 as the link and value2 as the content
# Set a IFTTT_MAKER_KEY environment variable containing your key
# Author:

Keybase proof

I hereby claim:

  • I am ryjen on github.
  • I am ryjen (https://keybase.io/ryjen) on keybase.
  • I have a public key ASC-db02whCj20wicuamJmdKEi2ZxFdUiW3reqFrXSmopQo

To claim this, I am signing this object:

@ryjen
ryjen / get_merge_adapter_position
Last active June 29, 2020 07:59
Android: How to get the correct CursorAdapter position inside a MergeAdapter (cwac.commonsware.com)
/**
* gets [section,item idx in section] for raw list position
*
* @param adapter
* @param position: raw position in {@link com.commonsware.cwac.merge.MergeAdapter}
* @return ArrayList<Integer>
*/
public static Pair<Integer, Integer> getMergeAdapterPos(MergeAdapter adapter, int
position) {
int section = -1;
@ryjen
ryjen / sfml.rb
Last active December 30, 2015 12:29 — forked from juniorz/sfml.rb
require 'formula'
class Sfml < Formula
homepage 'http://www.sfml-dev.org'
version '2.1'
url 'https://github.com/LaurentGomila/SFML/archive/2.1.zip'
sha1 'ff345985a301bbee350b1193f48f712acc656fc6'
head 'https://github.com/LaurentGomila/SFML/archive/master.zip'
@ryjen
ryjen / polymorphism.c
Last active November 19, 2015 06:59
Poor Man's Polymorphism in C
/**
*
* Poor mans polymorphism
*
* c0der78 (www.arg3.com)
*/
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
@ryjen
ryjen / fortune2sqlite.java
Created July 5, 2012 05:07
A java class to create a sqlite database from a collection of raw UNIX 'fortune' files
package com.arg3.java.fortunes;
import java.io.BufferedInputStream;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;