This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
""" | |
I couldn't get the "official" TT-RSS plugin to work so I make a Python script to utilize their APIs. | |
Overall, this is simple -- query TT-RSS for all starred articles and put the new ones into Wallybag. Very straight forward | |
Needs API keys for both your TT-RSS and Wallabag instances. And set the environment variables below appropriated | |
Does require `requests` library but you probably have that anyway | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3, json, os, shutil, subprocess | |
from argparse import ArgumentParser | |
""" | |
Big Chalice Deployer deployes Chalice Apps using the "chalice package ..." command and | |
modifies the resulting sam.json template to make use of the Docker deployment process | |
instead of the default, s3 based, process. Additionally, the ability to delete the | |
resulting SAM App is available via the CLI. | |
Usage: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# assumptions: | |
# mappings is a list of pydentic objects extending BaseModel - https://pydantic-docs.helpmanual.io | |
# filename is the filename you want to export to | |
import csv | |
from pathlib import Path | |
def out_mapping(filename: str, mappings: List): | |
out_csv = Path(filename) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby -E utf-8 | |
# coding: utf-8 | |
# merge_asana_into_omnifocus.rb | |
# Hilton Lipschitz | |
# http://www.hiltmon.com | |
# Use and modify freely, attribution appreciated | |
# Script to import Asana projects and their tasks into | |
# OmniFocus and keep them up to date from Asana. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# install Github Desktop to get their config | |
# then you can do this | |
# https://desktop.github.com/ | |
. (Resolve-Path "$env:LOCALAPPDATA\GitHub\shell.ps1") | |
# then install psget and install modules | |
# before putting these lines in here | |
# see https://github.com/psget/psget | |
Import-Module PowerLs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defn sieve | |
([numbers primes composites] | |
(cond (empty? numbers) primes | |
(contains? composites (first numbers) ) (do (sieve (rest numbers) primes composites)) | |
:else (do | |
(def current (first numbers)) | |
(def new-primes (conj primes current)) | |
(def new-composites | |
(into (sorted-set) (concat composites (range (* 2 current ) (inc (last numbers)) current)))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generated by Django 3.1 on 2020-08-19 15:28 | |
from django.db import migrations | |
from pathlib import Path | |
import csv | |
from django.db import transaction | |
def parse_file(apps, schema_editor): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import subprocess | |
def get_profile_credentials(profile_name): | |
# stolen from https://gist.github.com/wjimenez5271/defeede8eb4a63afc9d8 | |
from configparser import ConfigParser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class BigDecimalCodec implements Codec<BigDecimal> { | |
// Note that you may not want it to be double -- choose your own type. | |
@Override | |
public void encode(final BsonWriter writer, final BigDecimal value, final EncoderContext encoderContext) { | |
writer.writeDouble(value); | |
} | |
@Override | |
public BigDecimal decode(final BsonReader reader, final DecoderContext decoderContext) { | |
return reader.readDouble(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am squarepegsys on github. | |
* I am nerddad42 (https://keybase.io/nerddad42) on keybase. | |
* I have a public key ASBJ0AeDZngh0-lXLOLZL9gK0n9trGUjef7PqD4MCp0A_Qo | |
To claim this, I am signing this object: |
NewerOlder