Skip to content

Instantly share code, notes, and snippets.

View davoclavo's full-sized avatar
🎯
Focusing

Davo davoclavo

🎯
Focusing
View GitHub Profile
@veekaybee
veekaybee / normcore-llm.md
Last active May 6, 2024 16:10
Normcore LLM Reads

Anti-hype LLM reading list

Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.

Foundational Concepts

Screenshot 2023-12-18 at 10 40 27 PM

Pre-Transformer Models

@IanColdwater
IanColdwater / twittermute.txt
Last active April 22, 2024 17:26
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@absk1317
absk1317 / clear_gitlab_artifacts.rb
Created September 16, 2019 09:40
delete old gitlab artifacts
require 'httparty'
token = 'YOUR_TOKEN'
project_id = 'PROJECT_ID'
query = { per_page: 100 }
headers = { "PRIVATE-TOKEN" => token }
server = "https://gitlab.com/api/v4/projects/#{project_id}/jobs"
response = HTTParty.get(server, query: query, headers: headers)
@vic
vic / README.md
Last active December 9, 2016 21:22
Display elixir exceptions / mix test / credo as iTerm2 notifications.

Open your iTerm2 preferences, then under Profiles / Advanced / Triggers add some regular expressions for the errors you want to notify. On Action select Post Notification, if the regex has group captures, you can use them as parameters.

FunTip: Under Action select Run Command with parameters: say "\1"

ProTip: mix test --listen-on-stdin will re-run tests when you hit enter. Others like to use the mix_test_watch package, but I prefer not to add another dependency.

@oinopion
oinopion / read-access.sql
Created October 5, 2016 13:00
How to create read only user in PostgreSQL
-- Create a group
CREATE ROLE readaccess;
-- Grant access to existing tables
GRANT USAGE ON SCHEMA public TO readaccess;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO readaccess;
-- Grant access to future tables
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO readaccess;

This document has moved!

It's now here, in The Programmer's Compendium. The content is the same as before, but being part of the compendium means that it's actively maintained.

@maxvt
maxvt / scala-and-elixir-sf-meetup-notes.md
Created June 10, 2016 21:06
Notes on _Scala and Elixir_ - a talk by Jeff Alexander at Erlang&Elixir SF MeetUp (8-Jun-2016)

Notes on Scala and Elixir - a talk by Jeff Alexander at Erlang&Elixir SF MeetUp (8-Jun-2016)

Jeff uses mostly Scala at work, trying out Elixir mostly for personal education.

Both languages are VM based. Scala: everything is a function. Elixir: everything is an expression. Both have tail recursion and pattern matching.

Let's look at performance:

@davoclavo
davoclavo / up-and-running-with-edeliver-on-do.md
Last active June 6, 2022 11:55 — forked from mattweldon/up-and-running-with-edeliver-on-do.md
Getting Elixir / Phoenix running on Digital Ocean with edeliver

Build Server

  • Go to Digital Ocean
  • Create new ubuntu droplet

Setup Server

@jkpl
jkpl / Main.scala
Last active February 5, 2024 08:29
Ways to pattern match generic types in Scala
object Main extends App {
AvoidLosingGenericType.run()
AvoidMatchingOnGenericTypeParams.run()
TypeableExample.run()
TypeTagExample.run()
}
class Funky[A, B](val foo: A, val bar: B) {
override def toString: String = s"Funky($foo, $bar)"
}

My Elixir Deployment Wishlist

Foreward

Based on my recent experience of deployment, I've become rather frustrated with the deployment tooling in Elixir. This document is the result of me thinking to myself, "I wish we had x...". This document isn't meant to dishearten anyone who has built tooling for elixir - thank you so much for what you've done. This is meant more as what I personally see as something that would help a lot of Erlang/Elixir newbies like myself to be able to get deploying quickly and efficiently.

1. Release files should be templates

It should be possible to add in custom configuration to the bootstrap scripts. This would allow plugins to be able to add extra steps to the startup / shutdown / upgrade procedure. One way to implement this would be to make all scripts which handle bootstrapping or controlling the machine [.eex][1] templates. This would allow other parts of the release system to inject new functionality where needed.