Skip to content

Instantly share code, notes, and snippets.

View aegis1980's full-sized avatar

Jon Robinson aegis1980

View GitHub Profile
@aegis1980
aegis1980 / wxr2txt.py
Last active August 22, 2017 06:21 — forked from ruslanosipov/wxr2txt.py
Script to convert WordPress posts to plain text files
#!/usr/bin/env python
"""This script converts Wordpress WXR file to a number of plain text files.
WXR stands for "WordPress eXtended RSS", which basically is just a
regular XML file. This script extracts entries from the WXR file into
plain text files. Output format: article name prefixed by date for
posts, article name for pages.
Usage: wxr2txt.py filename [-o output_dir]
@aegis1980
aegis1980 / CursorFragmentStatePagerAdapter.java
Last active January 8, 2018 19:57 — forked from peterkuterna/CursorFragmentPagerAdapter.java
Use FragmentStatePagerAdapter with cursor rather than Collection/Array data structure
package com.example;
import android.content.Context;
import android.database.Cursor;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.util.SparseIntArray;
import android.view.ViewGroup;
@aegis1980
aegis1980 / export_to_csv.sh
Created August 7, 2022 03:34 — forked from snorfalorpagus/export_to_csv.sh
Simple conversion utility for Microsoft Access databases (.mdb) to SQLite3.
#!/bin/bash
# usage: export_to_csv.sh <database.sqlite>
sqlite3 $1 "SELECT tbl_name FROM sqlite_master WHERE type='table' and tbl_name not like 'sqlite_%';" | while read table; do
echo $table
sqlite3 $1 <<!
.headers on
@aegis1980
aegis1980 / xfoil.py
Last active November 26, 2023 02:53 — forked from helo9/xfoil.py
use python to run xfoil analysis
# -*- coding: utf-8 -*-
import os
import numpy as np
import subprocess as sp
import re
def polar(afile, re, *args,**kwargs):
"""calculate airfoil polar and load results