{"id":16451737,"url":"https://github.com/tpolecat/examples","last_synced_at":"2025-03-21T05:30:38.323Z","repository":{"id":6918558,"uuid":"8169289","full_name":"tpolecat/examples","owner":"tpolecat","description":"Example usage of scalaz and uncommon Scala features.","archived":false,"fork":false,"pushed_at":"2016-09-13T12:42:07.000Z","size":169,"stargazers_count":83,"open_issues_count":2,"forks_count":16,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-03-11T11:09:35.666Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tpolecat.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-02-12T23:03:37.000Z","updated_at":"2024-02-23T01:26:08.000Z","dependencies_parsed_at":"2022-08-26T09:31:09.547Z","dependency_job_id":null,"html_url":"https://github.com/tpolecat/examples","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpolecat%2Fexamples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpolecat%2Fexamples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpolecat%2Fexamples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tpolecat%2Fexamples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tpolecat","download_url":"https://codeload.github.com/tpolecat/examples/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244115430,"owners_count":20400573,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-11T10:10:12.134Z","updated_at":"2025-03-21T05:30:37.915Z","avatar_url":"https://github.com/tpolecat.png","language":"Scala","funding_links":[],"categories":[],"sub_categories":[],"readme":"examples\n========\n\nExtremely random crap, much of which needs revisiting. Buyer beware. Note that there are some example tests in `src/test/scala`.\n\nAlso, I sometimes write [blog posts](http://tpolecat.github.io/) on Scala.\n\nstarting a repl\n---------------\n\nPaul Phillips wrote this after becoming outraged by the awful unmaintainable shell alias I was using.\n\n```bash\n#!/usr/bin/env bash\n#\n \nset -e\n \npushd \"$(mktemp -dt scalaz)\"\ncat \u003ebuild.sbt \u003c\u003cEOM\nscalaVersion := \"2.11.6\"\n\nlibraryDependencies ++= Seq(\n  \"org.scalaz\" %% \"scalaz-core\" % \"7.1.1\",\n  \"org.scalaz\" %% \"scalaz-concurrent\" % \"7.1.1\",\n  \"org.scalaz\" %% \"scalaz-effect\" % \"7.1.1\"\n)\n\ninitialCommands := \"import scalaz._, Scalaz._\"\nEOM\n \nsbt console\npopd\n```\n\n\n\nrandom crap\n-----------\n\nI know nothing about shell scripting because I want to retain plausible deniability (shell scripting, installers, and crystal reports are the unholy trinity of bullshit you never want to admit you can do). Having said that, here are some very crappy scripts that I just wrote to improve my sanity.\n\nList the packages contained in a jarfile\n\n```\n#!/bin/bash\njar tf $1 | grep class$ | perl -pe \"s|/[^/]*class$||;s|/|.|g\" | sort | uniq\n```\n\nDisplay the manifest\n\n```\n#!/bin/bash\nunzip -p $1 META-INF/MANIFEST.MF\n```\n\nEdit the manifest in-place (note that this creates and destroys `META-INF/MANIFEST.MF` in the local dir ... really need to do this in `/tmp` or something).\n\n```\n#!/bin/bash\nunzip $1 META-INF/MANIFEST.MF \u003e /dev/null\nmate -w META-INF/MANIFEST.MF\njar umf META-INF/MANIFEST.MF $1 2\u003e /dev/null\nrm META-INF/MANIFEST.MF\nrmdir META-INF\necho \"*** UPDATED TO\"\nunzip -p $1 META-INF/MANIFEST.MF\n```\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftpolecat%2Fexamples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftpolecat%2Fexamples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftpolecat%2Fexamples/lists"}