Skip to content

Instantly share code, notes, and snippets.

View KronicDeth's full-sized avatar

Kadie 𒂗𒃶𒌌𒀭𒈾 𒀭𒈹 (Kadie Enheduanna Inanna) KronicDeth

View GitHub Profile
-module(init).
-export([start/0]).
-import(erlang, [print/1]).
-spec start() -> ok | error.
start() ->
Binary = <<"Hello, Lonestar Elixir 2020!">>,
print(Binary).
function insertHREFs() {
// get all anchor tags
// THIS WORSK IN IE OR CHROME
var navControlLinks = document.querySelectorAll('a[data-nav-control-id]');
for(var i=0; i < navControlLinks.length; i++) {
var element = navControlLinks[i];
var dataNavControlId = element.getAttribute('data-nav-control-id');
var value = obj.get(dataNavControlId);
concatenateURL(element, value);
function insertHREFs() {
// get all anchor tags
// THIS DOESN'T WORK IN IE OR CHROME - INACTIVE a tags
var queryAllAWithSelector = document.querySelectorAll('a[data-nav-control-id]');
for(var dataLoop=0; dataLoop < queryAllAWithSelector.length; dataLoop++) {
var dataNav = element.getAttribute('data-nav-control-id');
var value = obj.get(dataNav);
concatenateURL(element, value);
}
<script>
function colorCodeTags(){
var cells = document.getElementsByTagName("td");// finding all the TD tags
for (var cell of cells) {
if (!cell.classList.contains("ms-vb-title")) {
const innerText = cell.innerText
switch (cell.innerText) {
case "Blue":
@KronicDeth
KronicDeth / panel.kt
Created January 14, 2018 17:18
Dbgi Clause viewer with annotators active
package org.elixir_lang.beam.chunk.debug_info.v1.elixir_erl.v1.definitions.definition.clause
import com.intellij.openapi.application.ApplicationManager
import com.intellij.openapi.editor.EditorFactory
import com.intellij.openapi.project.Project
import com.intellij.psi.PsiDocumentManager
import com.intellij.psi.PsiFileFactory
import org.elixir_lang.ElixirFileType
import org.elixir_lang.ElixirLanguage
import org.elixir_lang.Macro

Keybase proof

I hereby claim:

  • I am kronicdeth on github.
  • I am kronicdeth (https://keybase.io/kronicdeth) on keybase.
  • I have a public key ASCaw6YvXXA622m4NemJ-51E4VFLVKi5xWoYWEUNjweRgAo

To claim this, I am signing this object:

@KronicDeth
KronicDeth / elixirconf-2017-recap.md
Created September 22, 2017 21:18
Recap of all talks at ElixirConf 2017

Elixir Native UI - Boyd Multerer https://www.youtube.com/watch?v=77FW-jrCyCs

Thinking In Ecto - Darin Wilson https://www.youtube.com/watch?v=YQxopjai0CU

  1. Repository pattern https://youtu.be/YQxopjai0CU?t=2m12s
  2. Explicitness https://youtu.be/YQxopjai0CU?t=5m29s
@KronicDeth
KronicDeth / deprecation.md
Created May 22, 2017 20:39
HowTo make deprecation warnings in Elixir

TIL how to make deprecation warnings:

Compiling 2 files (.ex)
warning: `Retort.Resources.timeout/2` is deprecated; call `Retort.Resources.Timeout.get_or_default/2` instead.
  lib/retort/resources.ex:197: Retort.Resources.timeout/2

Replace function

@KronicDeth
KronicDeth / resources.ex
Created November 16, 2016 05:33
Converts actions from a controller or RPC server using JSONAPI formatted params to calls on a `Resources` module.
defmodule InterpreterServerJSONAPI.Resources do
@moduledoc """
Converts actions from a controller or RPC server using JSONAPI formatted params to calls on a `Resources` module.
"""
alias Alembic.{Document, Fetch, Fetch.Includes, FromJson, ToParams, Source}
alias InterpreterServerJSONAPI.{Authorization, Meta}
alias Resources.Page
# Constants
@KronicDeth
KronicDeth / Vagrantfile
Last active October 27, 2016 02:18
Vagrantfile for Erlang Meetup 27OCT2016
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at