Skip to content

Instantly share code, notes, and snippets.

View ConnorRigby's full-sized avatar
🏎️

Connor Rigby ConnorRigby

🏎️
View GitHub Profile
@ConnorRigby
ConnorRigby / Ender3-Cura-Profiles.md
Last active November 28, 2022 19:51
Ender3-Cura-Profiles
@trarbr
trarbr / peripheral.livemd
Created September 14, 2021 07:36
A BLE Peripheral Livebook example (using Livebook on Nerves and Blue Heron)

Peripheral

Library code

First we define the Characteristic and Service modules. Users of the library use these to declare the services that their device expose.

defmodule BlueHeron.GATT.Characteristic do
  defstruct [:id, :type, :properties, :permissions, :descriptors, :handle, :value_handle]
@keathley
keathley / .credo.exs
Last active December 30, 2023 16:13
Keathley's credo file
# This file contains the configuration for Credo and you are probably reading
# this after creating it with `mix credo.gen.config`.
#
# If you find anything wrong or unclear in this file, please report an
# issue on GitHub: https://github.com/rrrene/credo/issues
#
%{
#
# You can have as many configs as you like in the `configs:` field.
configs: [
@xerpi
xerpi / PSVita_Linux_build_instructions.md
Last active April 1, 2024 12:51
PSVita Linux build instructions
@jagrosh
jagrosh / Github Webhook Tutorial.md
Last active June 23, 2024 14:41
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings
@maxim
maxim / gh-dl-release
Last active June 5, 2024 21:11
Download assets from private Github releases
#!/usr/bin/env bash
#
# gh-dl-release! It works!
#
# This script downloads an asset from latest or specific Github release of a
# private repo. Feel free to extract more of the variables into command line
# parameters.
#
# PREREQUISITES
#
@alanpeabody
alanpeabody / my_app.ex
Last active June 11, 2024 06:32
Websockets in Elixir with Cowboy and Plug
defmodule MyApp do
use Application
def start(_type, _args) do
import Supervisor.Spec, warn: false
children = [
Plug.Adapters.Cowboy.child_spec(:http, MyApp.Router, [], [
dispatch: dispatch
])
@myusuf3
myusuf3 / delete_git_submodule.md
Created November 3, 2014 17:36
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@alco
alco / gist:2165064
Created March 22, 2012 22:20
Count the number of non-blank SLOC in an Elixir project
git ls-files | egrep '\.erl|\.ex[s]$' | xargs cat | sed '/^$/d' | wc -l