Skip to content

Instantly share code, notes, and snippets.

View collegeimprovements's full-sized avatar
💭
☀️

Arpit Shah collegeimprovements

💭
☀️
View GitHub Profile
@plembo
plembo / usefulsoftwarelist.md
Last active August 2, 2025 05:31
List of useful software

List of useful software

This is the software I like to have on various platforms, and is a work in progress (and so may morph wildly over time according to my personal whims) that I've started mostly for my own use. Recently I used this list in rebuilding my personal workstation after an awful day. Documentation saves (as do backups)!

Linux desktop

My personal workstation and laptop are currently running Ubuntu Desktop 22.04 LTS, moderately tailored for my own use.

Installation Sources and Methods

I prefer the latest vendor official packages or binaries when I can can find them (except where it would be too disruptive: like when they overwrite critical dependencies), but distro packages still form the backbone of my software loadout. The traditional packaging systems (apt for .deb under Ubuntu, and dnf for .rpm under RedHat) can be frustrating to work with, but the systems that seek to replace them (flatpak and snap) are not a panacea by any means (both continue to have trouble with CLI integration

@dasniko
dasniko / create_x509_certs.md
Last active June 13, 2025 05:56
Creating self signed tls certificates with self-signed root CA
@mkumm
mkumm / config-AlpineJS-3-phx-live.js
Created July 9, 2021 13:11
AlpineJS 3 with Phoenix Live
import "../css/app.scss"
import "phoenix_html"
import {Socket} from "phoenix"
import topbar from "topbar"
import {LiveSocket} from "phoenix_live_view"
import Alpine from 'alpinejs'
window.Alpine = Alpine
Alpine.start()
let csrfToken = document.querySelector("meta[name='csrf-token']").getAttribute("content")
@mcrumm
mcrumm / app.js
Last active March 4, 2025 13:07
flatpickr + LiveView example
// assets/js/app.js
// ...
import Pickr from "./pickr"
const hooks = {
Pickr
}
// ...
@myobie
myobie / application.ex
Last active July 21, 2025 18:19
Using Finch with ExAws
defmodule Example.Application do
@moduledoc false
use Application
def start(_type, _args) do
children = [
Example.Repo,
ExampleWeb.Telemetry,
{Phoenix.PubSub, name: Example.PubSub},
@Integralist
Integralist / Examples.md
Last active July 5, 2025 22:54
Vim: search and replace content using native vim cdo and cfdo commands #vim #replace #macro #quickfix

There are two 'types' to be aware of with a quickfix window:

  1. entry: the actual line content (e.g. :grep foo will show a specific line that matched within a file).
  2. file: the actual file itself (e.g. the path to the file that contained the match).

To replace content using vim (via the quickfix window) you need to choose whether you want to apply the change via the quickfix 'entry' or via the 'file' as a whole.

If you use cdo, then your 'action' (i.e. how you're going to replace content) will be applied to every entry in the quickfix window.

If you use cfdo, then your action will be applied to each file in the quickfix window.

@jeffkreeftmeijer
jeffkreeftmeijer / README.md
Last active December 29, 2020 14:45
Visualising recursive function calls in Elixir

Visualising recursive function calls in Elixir

For SICP Exercise 1.14 in Elixir, we'll first implement the count_change/1 function, which calculates how many different ways there are to make change using half-dollars (50 ¢), quarters (5 ¢), dimes (5 ¢) and pennies (1 ¢) for any given amount of money.

iex -r counting_change.exs
Erlang/OTP 23 [erts-11.0.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] [hipe]

Some useful custom text objects for vim

Collection of my custom text objects I use quite often.

97975602 6e90ee00 1dda 11eb 9286 6894300457e3

Numbers

Put it into your .vimrc:

@premek
premek / mv.sh
Last active March 5, 2024 17:43
Rename files in linux / bash using mv command without typing the full name two times
# Put this function to your .bashrc file.
# Usage: mv oldfilename
# If you call mv without the second parameter it will prompt you to edit the filename on command line.
# Original mv is called when it's called with more than one argument.
# It's useful when you want to change just a few letters in a long name.
#
# Also see:
# - imv from renameutils
# - Ctrl-W Ctrl-Y Ctrl-Y (cut last word, paste, paste)

Wow! Fantastic conference. I'm sure at the end we'll have a nice summary, so I'm not going gush too much.

But I must admit, I always enjoy these conferences, so thank you to everybody involved.

How many people have seen me speak at a previous elixir event? Oh, a fair number. «How many have heard me speak» twice?

All right, so the ones that have seen me speak are kind of nervous right now.