Skip to content

Instantly share code, notes, and snippets.

@petelacey
petelacey / Dockerfile
Last active April 7, 2025 01:02
Docker Compose setup for Elixir, Phoenix, and Postgres
FROM elixir:latest
# Install debian packages
RUN apt-get update && \
apt-get install --yes build-essential inotify-tools postgresql-client git && \
apt-get clean
ADD . /app
# Install Phoenix packages
@yogthos
yogthos / clojure-beginner.md
Last active April 18, 2025 02:43
Clojure beginner resources

Introductory resources

@baptx
baptx / instagram-api_send_message.js
Last active April 7, 2025 03:50
Instagram API: send direct messages from a web browser
/*
Instagram API: send direct messages from a web browser
Since April 2020, Instagram has a web version to send and read direct messages so my Instagram scripts are not longer needed and I would not recommend using them unless you really need it, to avoid being banned
(never happened to me with Instagram but WhatsApp is owned by Facebook also and they did it to users registering from an unofficial app like yowsup: https://github.com/tgalal/yowsup/commit/88b8ad9581fa22dac330ee3a05fec4e485dfa634#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5)
For browser setup, see script instagram-api_direct_messages_backup.js
Instagram web version sessionid cookie does not allow sending messages so we need to log in manually
Signature should match signed_body data (using HMAC-SHA256 with private key) but wrong signature or key may work also.
@tommycarstensen
tommycarstensen / verbos.py
Last active April 3, 2025 14:50
Conjugación de verbos en español
#!/usr/bin/env python
# Copyright (C) 2019, Tommy Carstensen
# https://brittanygervin.com/projects/stem-changing-spanish-verbs-flowchart/
# https://2.bp.blogspot.com/-Y8Y7cyZEpzs/WuLmoDZhvYI/AAAAAAAAPDs/GAAtM_6zA5EwG9aPkh0e06uUQ3vDXVSXQCLcBGAs/s1600/gram%25C3%25A1tica-mind-map.png
# https://www.spanishdict.com/guide/spanish-present-tense-forms
# https://www.spanishdict.com/guide/spanish-irregular-present-tense/
# https://www.spanishdict.com/guide/stem-changing-verbs/
# https://www.spanishdict.com/guide/spelling-changes-in-the-present-tense
@townsean
townsean / pixel-color-count.py
Created October 9, 2019 08:52
Gets a sum of pixels per unique color
# pixel-color-count.py - Gets a sum of pixels per unique color
# maintainer - Ashley Grenon @townsean
import argparse
try:
from PIL import Image
except ImportError:
exit("This script requires the PIL module. Install with pip install Pillow")
try:
@damienmarlier51
damienmarlier51 / junix.py
Last active September 11, 2022 05:00
Junix Exporter
import base64
import json
import os
from typing import Dict, List, Optional
def get_images(notebook_dict: Dict) -> List[Dict]:
return [
{
@dianjuar
dianjuar / i3-shortcuts-screenshot.md
Last active April 10, 2025 17:28
My i3 shortcuts to take screenshots

Requirements

  • maim
  • xclip

Set-up

Set this on your i3 config file ~/.i3/config

# Screenshots
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tbenst
tbenst / julia-shell.nix
Created February 23, 2019 17:46
use with `nix-shell julia-shell.nix`
with import <nixpkgs> {};
let
d = version: "v${lib.concatStringsSep "." (lib.take 2 (lib.splitString "." version))}";
extraLibs = [
# IJulia.jl
mbedtls
zeromq3
# ImageMagick.jl
imagemagickBig
# HDF5.jl